User Tools

Site Tools


os:windows:powershell

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
os:windows:powershell [2014-12-18 20:08] – external edit 127.0.0.1os:windows:powershell [2018-12-04 09:16] (current) root
Line 1: Line 1:
 ====== PowerShell ====== ====== PowerShell ======
  
-== Verzeichnis temporär zu PATH-Variable hinzufügen ==+===== Basic =====
  
-  $ENV:PATH +";C:\Users\Admin\bin"+==== Temporary add a directory to the PATH variable ====
  
-== Links ==+<code> 
 +$ENV:PATH +";C:\Users\Admin\bin" 
 +</code>
  
-  * [[http://www.magnus.de/tabelle/formatierungsoption-fuer-f.html]]+==== Parse integer ====
  
 +<code>
 +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
 +</code>
  
-== Multidimensionale Arrays ==+==== Multidimensionale Arrays ====
  
 <code> <code>
Line 29: Line 41:
 g g
 PS C:\> PS C:\>
 +</code>
 +
 +===== Scheduled Tasks =====
 +
 +==== Change Priority ====
 +
 +This will only change the priority setting and keep the other settings. The password of the task user is required.
 +
 +<code>
 +$task = Get-ScheduledTask -TaskName "ThisIsMyTask"
 +$settings = $task.Settings
 +$settings.Priority = 5
 +Set-ScheduledTask -TaskName $task.TaskName -Settings $settings -User $task.Principal.UserId -Password "asdf1234"
 </code> </code>
os/windows/powershell.1418929733.txt.gz · Last modified: 2016-09-05 23:05 (external edit)