===== PowerShell =====
* [[https://www.microsoft.com/en-us/download/details.aspx?id=50395|PowerShell 5.0 Download]] (Windows Management Framework 5.0)
*[[http://technet.microsoft.com/en-us/library/cc196356.aspx|Windows PowerShell User's Guide]]
*[[http://www.microsoftvirtualacademy.com/training-courses/windows-powershell-3-0-fuer-einsteiger-teil-1|Microsoft Virtual Academy: Windows PowerShell 3.0 für Einsteiger]]
*[[http://blogs.technet.com/b/heyscriptingguy/archive/2012/02/04/the-2012-windows-powershell-scripting-games-all-links-on-one-page.aspx|Windows PowerShell Scripting Games 2012]]
*[[http://ramblingcookiemonster.wordpress.com/powershell-resources/|rambling cookie monster: PowerShell Resources]]
* Youtube: [[http://www.youtube.com/watch?v=-Ya1dQ1Igkc|My Final 1-Day PowerShell v2 Workshop (4h Youtube)]]
* Youtube: [[https://www.youtube.com/user/powershellorg/videos?view=0&sort=da&flow=list|PowerShell.org Summit 2015 Videos]]
* Youtube: [[https://www.youtube.com/playlist?list=PL6D474E721138865A|Learn Windows PowerShell in a Month of Lunches]]
* [[http://technet.microsoft.com/en-us/library/ee176927.aspx|Piping and the Pipeline in Windows PowerShell]]
* [[http://msdn.microsoft.com/en-us/library/aa830112.aspx|MSDN Windows PowerShell]]
* [[http://www.zdnet.de/41551262/powershell-grundlagen-so-spart-man-zeit-bei-der-administration-in-windows/|kurze PowerShell-Grundlagen]]
* [[https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_automatic_variables|PS-Standardvariablen]] wie ''$_''
* [[http://poshcode.org/|PowerShell Code Repository]]
* **Kommentare**
* ''#'': einzeilig
* ''<# ... #>'': mehrzeilig
Backup-Skript mit PowerShell:
$timestamp = Get-Date -Format yyyy-MM-dd_HHmmss
$zielPfad = "C:\Backups\ziel-ordner"
$quellPfad = "\\gerateNameOderIP\ordner1\ordner2\quell-ordner"
"ZIP-Backup von der Quell-Ordner erstellen $quellPfad erstellen"
"und lokal unter $zielPfad speichern."
Compress-Archive -Path "$quellPfad" -DestinationPath "$zielPfad\quell-ordner_$timestamp.zip"
Get-ChildItem *.jpg | Rename-Item -NewName {$_.name.PadLeft(9, '0')}
# Die 9 ist die Ziel-Dateinamenlänge; also z.B. 00001.jpg
PowerShell-Skript über .bat-Datei aufrufen:
powershell.exe -command "& 'C:\Apps\Powershell\Backup-Skripte\BA-Backup_small.ps1'"