Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Using PowerShell 1.0 copy-item GroupPolicy Folder(C:\WINDOWS\system32\GroupPolicy)

$
0
0

Hello everybody,

This is my first time posting in this forum and i have encounted an issue i hope you can help i'm trying to create a powershell 1.0 script as this is for Windows XP to copy default policy back to their original folder then do a gpupdate on the copmuter so that the Local policy are returned to their default but i'm having access denied as this is user account and needed a way to make it run as an administrator but without success as i'm new powershell. 

Copy-Item 'C:\WINDOWS\system32\GroupPolicy\Original Group Policy for User and Machine\Machine\*' 'C:\WINDOWS\system32\GroupPolicy\Machine\'

Copy-Item 'C:\WINDOWS\system32\GroupPolicy\Original Group Policy for User and Machine\User\*' 'C:\WINDOWS\system32\GroupPolicy\User\'

Your help is much appreciated.


Viewing all articles
Browse latest Browse all 21975

Trending Articles