2016-11-14

Powershell 備份/匯入 GPO 的指令

Backup

$Path = ('C:\GPO_Backup\GPOBackup_' + (Get-Date -Format 'yyyyMMdd')) mkdir $Path Backup-Gpo -All -Path $Path

Import

Get-GPO -all | select DisplayName
New-GPO -Name "GPO_TargetName" Import-GPO -BackupGpoName "GPO_SourceNameInBackup" -Path "C:\GPO_Backup" -TargetName "GPO_TargetName"

沒有留言:

張貼留言