Gestire le policy di Windows Server con Powershell

Policy via Powershell
Vuoi abilitare Powershell all’utilizzo dei cmdlets delle policies?

 

 

Ecco il comando:

Import-Module grouppolicy

 

Qui di seguito sono elencati tutti i comandi disponibili:

Backup-GPO http://go.microsoft.com/fwlink/?LinkID=143240
Copy-GPO http://go.microsoft.com/fwlink/?LinkID=143241
Get-GPInheritance http://go.microsoft.com/fwlink/?LinkID=143242
Get-GPO http://go.microsoft.com/fwlink/?LinkID=143243
Get-GPOReport http://go.microsoft.com/fwlink/?LinkID=143244
Get-GPPermissions http://go.microsoft.com/fwlink/?LinkID=143245
Get-GPPrefRegistryValue http://go.microsoft.com/fwlink/?LinkID=143246
Get-GPRegistryValue http://go.microsoft.com/fwlink/?LinkID=143247
Get-GPResultantSetOfPolicy http://go.microsoft.com/fwlink/?LinkID=143248
Get-GPStarterGPO http://go.microsoft.com/fwlink/?LinkID=143249
Import-GPO http://go.microsoft.com/fwlink/?LinkID=143250
New-GPLink http://go.microsoft.com/fwlink/?LinkID=143251
New-GPO http://go.microsoft.com/fwlink/?LinkID=143252
New-GPStarterGPO http://go.microsoft.com/fwlink/?LinkID=143253
Remove-GPLink http://go.microsoft.com/fwlink/?LinkID=143254
Remove-GPO http://go.microsoft.com/fwlink/?LinkID=143255
Remove-GPPrefRegistryValue http://go.microsoft.com/fwlink/?LinkID=143256
Remove-GPRegistryValue http://go.microsoft.com/fwlink/?LinkID=143257
Rename-GPO http://go.microsoft.com/fwlink/?LinkID=143258
Restore-GPO http://go.microsoft.com/fwlink/?LinkID=143259
Set-GPInheritance http://go.microsoft.com/fwlink/?LinkID=143260
Set-GPLink http://go.microsoft.com/fwlink/?LinkID=143261
Set-GPPermissions http://go.microsoft.com/fwlink/?LinkID=143262
Set-GPPrefRegistryValue http://go.microsoft.com/fwlink/?LinkID=143263
Set-GPRegistryValue http://go.microsoft.com/fwlink/?LinkID=143264

Alcuni esempi di utilizzo:

per elencare tutte le policies:
get-gpo -all|sort-object -descending ModificationTime|ft DisplayName,Id,ModificationTime -autosize

per fare il backup di tutte le policies:
Backup-GPO -all -path PERCORSO

per creare un report HTML di una Policy:
Get-GPOReport “NOMEPOLICY”  -ReportType html  -Path “PERCORSO\NOMEFILE.html”

Pubblicità

Lascia un commento qui

Effettua il login con uno di questi metodi per inviare il tuo commento:

Logo di WordPress.com

Stai commentando usando il tuo account WordPress.com. Chiudi sessione /  Modifica )

Foto di Facebook

Stai commentando usando il tuo account Facebook. Chiudi sessione /  Modifica )

Connessione a %s...