os:windows:powershell
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
os:windows:powershell [2011-02-09 17:22] – root | os:windows:powershell [2018-12-04 09:16] (current) – root | ||
---|---|---|---|
Line 1: | Line 1: | ||
====== PowerShell ====== | ====== PowerShell ====== | ||
+ | ===== Basic ===== | ||
- | $env:path += "; | + | ==== Temporary add a directory to the PATH variable ==== |
+ | < | ||
+ | $ENV:PATH += "; | ||
+ | </ | ||
- | ===== Links ===== | + | ==== Parse integer |
- | * [[http:// | + | < |
+ | PS H:\> $x = Read-Host | ||
+ | a | ||
+ | PS H: | ||
+ | False | ||
+ | PS H:\> $x = Read-Host | ||
+ | 5 | ||
+ | PS H:\> [int32]:: | ||
+ | True | ||
+ | </ | ||
+ | ==== Multidimensionale Arrays ==== | ||
+ | < | ||
+ | PS C:\> $a = ( " | ||
+ | PS C:\> $a += ,( " | ||
+ | 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:\> | ||
+ | </ | ||
+ | |||
+ | ===== Scheduled Tasks ===== | ||
+ | |||
+ | ==== Change Priority ==== | ||
+ | |||
+ | This will only change the priority setting and keep the other settings. The password of the task user is required. | ||
+ | |||
+ | < | ||
+ | $task = Get-ScheduledTask -TaskName " | ||
+ | $settings = $task.Settings | ||
+ | $settings.Priority = 5 | ||
+ | Set-ScheduledTask -TaskName $task.TaskName -Settings $settings -User $task.Principal.UserId -Password " | ||
+ | </ |
os/windows/powershell.1297268575.txt.gz · Last modified: 2014-12-18 20:10 (external edit)