User Tools

Site Tools


microsoft: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
microsoft:powershell [2018/05/29 13:21] – external edit 127.0.0.1microsoft:powershell [2018/12/05 16:23] (current) felix
Line 24: Line 24:
     * ''<# ... #>'': mehrzeilig     * ''<# ... #>'': mehrzeilig
  
 +Backup-Skript mit PowerShell:
 <code powershell> <code powershell>
 $timestamp = Get-Date -Format yyyy-MM-dd_HHmmss $timestamp = Get-Date -Format yyyy-MM-dd_HHmmss
Line 37: Line 38:
 Get-ChildItem *.jpg | Rename-Item -NewName {$_.name.PadLeft(9, '0')} Get-ChildItem *.jpg | Rename-Item -NewName {$_.name.PadLeft(9, '0')}
 # Die 9 ist die Ziel-Dateinamenlänge; also z.B. 00001.jpg # Die 9 ist die Ziel-Dateinamenlänge; also z.B. 00001.jpg
 +</code>
 +
 +PowerShell-Skript über .bat-Datei aufrufen:
 +<code dos>
 +powershell.exe -command "& 'C:\Apps\Powershell\Backup-Skripte\BA-Backup_small.ps1'"
 </code> </code>
microsoft/powershell.1527592874.txt.gz · Last modified: by 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki