User Tools

Site Tools


os:windows:powershell

This is an old revision of the document!


PowerShell

Temporary add a directory to the PATH variable
$ENV:PATH += ";C:\Users\Admin\bin"
Parse integer
PS H:\> $x = Read-Host
a
PS H:\> [int32]::TryParse($x,[ref]0)
False
PS H:\> $x = Read-Host
5
PS H:\> [int32]::TryParse($x,[ref]0)
True
Multidimensionale Arrays
PS C:\> $a = ( "a", "b", "c" ),( "d", "e", "f" )
PS C:\> $a += ,( "g", "h", "i" )
PS C:\>
PS C:\> $a[0]
a
b
c
PS C:\> $a[2]
g
h
i
PS C:\> $a[0][0]
a
PS C:\> $a[2][0]
g
PS C:\>
os/windows/powershell.1479568497.txt.gz · Last modified: 2016-11-19 16:14 by root