DESKTOP

Windows Server 2008 and Windows Vista : Backing Up and Restoring GPOs (part 2)

11/13/2013 8:22:32 PM

4. RestoreAllGPOs.wsf

This script restores all GPOs from the backup location. If you have archived numerous GPOs in the backup location for a single GPO, the script will restore only the most recent backup for each GPO. If you do not specify a domain, the restore occurs in the current domain.

Syntax
Usage: RestoreAllGPOs.wsf BackupLocation [/Domain:value]
BackupLocation: File system location containing the GPO backups.
Domain: DNS name of domain.

Example & Output

This script simply restores all of the GPOs that have been archived in the gpo-backup share location to the domain.

cscript RestoreAllGPOs.wsf \\server1\gpo-backup
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

2 backups found at location \\server1\gpo-backup.
Processing backed up GPO 'Default Domain Policy'
The restore operation completed successfully.

Processing backed up GPO 'Default Domain Controllers Policy'
The restore operation completed successfully.

Restore succeeded for 2 GPOs.
Restore failed for 0 GPOs.

5. QueryBackupLocation.wsf

This script provides a view into the location on the file system where you have backed up GPOs. It allows you to see which GPOs are archived to a specific location on the file system, whether the backup scripts ran (BackupAllGPOs.wsf and BackupGPO.wsf), and detailed information about the archived GPOs if the Verbose switch is used.

Syntax
Usage: QueryBackupLocation.wsf BackupFolder [/Verbose]
BackupFolder: File system location to query.
Verbose: Displays detailed information about each backup.

Example #1 & Output

This script queries the backup location in the gpo-backup share and returns a list of all GPOs that have been archived there.

cscript QueryBackupLocation.wsf \\server1\gpo-backup
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

The following GPOs are backed up at \\server1\gpo-backup:
-- Summary --
{31B2F340-016D-11D2-945F-00C04FB984F9} - Default Domain Policy
{6AC1786C-016F-11D2-945F-00C04fB984F9} - Default Domain Controllers Policy

Example #2 & Output

This script queries the backup location in the gpo-backup share and returns a list of all GPOs that have been archived there, including full details about each of the archive points, including dates, descriptions, and Backup IDs.

cscript QueryBackupLocation.wsf \\server1\gpo-backup /verbose
Microsoft (R) Windows Script Host Version 5.7
Copyright (C) Microsoft Corporation. All rights reserved.

The following GPOs are backed up at \\server1\gpo-backup:
-- Summary --
{31B2F340-016D-11D2-945F-00C04FB984F9} - Default Domain Policy
{6AC1786C-016F-11D2-945F-00C04fB984F9} - Default Domain Controllers Policy

-- Details --
GPO Name: Default Domain Policy
GPO ID: {31B2F340-016D-11D2-945F-00C04FB984F9}

2 backup(s)

BackupID: {A19258BC-2584-4081-80C6-24E5F6BD19F2}
Timestamp: Fri Nov 2 09:43:44 EDT 2007
Comment: Default Domain Policy 11/2/2007

BackupID: {4C02A6A1-3571-4D9E-9796-3A3401280197}
Timestamp: Wed Oct 31 22:43:04 EDT 2007
Comment:

GPO Name: Default Domain Controllers Policy
GPO ID: {6AC1786C-016F-11D2-945F-00C04fB984F9}

1 backup(s)

BackupID: {8A9A15DB-01EC-485E-BEE3-7F0B06AA18B1}
Timestamp: Wed Oct 31 22:43:20 EDT 2007
Comment:
Other  
  •  Windows Small Business Server 2011 : Creating Custom Alerts - Creating an Alert for a Stopped Service, Custom Alert for Backup Failure
  •  Windows Small Business Server 2011 : Configuring Alerts - Alerts for Services, Performance Counter Alert, Event Log Error Alerts
  •  Windows Small Business Server 2011 : Network Reports (part 2) - Customizing the Detailed Network Report
  •  Windows Small Business Server 2011 : Network Reports (part 1) - Customizing the Summary Report
  •  Windows 8 : Diagnosis and Recovery - Windows Recovery Environment
  •  Windows 8 : Diagnosis and Recovery - Refresh and Reset
  •  Windows 8 : Diagnosis and Recovery - The Startup, Users, Details, and Services Tabs
  •  Windows Server 2008 R2 networking : Network Monitoring and Troubleshooting Utilities
  •  Windows Server 2008 R2 networking : Planning and Deploying DHCP (part 2) - Deploying DHCP
  •  Windows Server 2008 R2 networking : Planning and Deploying DHCP (part 1) - Planning for DHCP
  •  
    Most View
    Motorola RAZR MAXX - “Being The World’s Lightest”
    The Download Directory - November 2012 (Part 2) - UltraVNC 1.1.0.0 Beta, Firefox 16 Beta 3, BlueScreenView 1.45 Description: BlueScreenView
    SMC Networks SMCWTVA100 Multimedia Adapter
    Dell XPS One 27 Touch - Big, Bright, Bold And Responsive
    This Month Highlight – November 2012 (Part 2)
    Pentax MX-1 - A New Retro-Styled Compact Camera (Part 1)
    Android Application Development : Drawing 2D and 3D Graphics - Bling (part 2) - Animation - Transition animation
    Quirks In File And Folder Naming (Part 1)
    Which Full-size Tablet Do You Want?
    Nero Trigger - All Things Photography (Part 1)
    REVIEW
    - First look: Apple Watch

    - 3 Tips for Maintaining Your Cell Phone Battery (part 1)

    - 3 Tips for Maintaining Your Cell Phone Battery (part 2)
    VIDEO TUTORIAL
    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 1)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 2)

    - How to create your first Swimlane Diagram or Cross-Functional Flowchart Diagram by using Microsoft Visio 2010 (Part 3)
    Popular Tags
    Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS
    Top 10
    3 Tips for Maintaining Your Cell Phone Battery (part 2) - Discharge Smart, Use Smart
    3 Tips for Maintaining Your Cell Phone Battery (part 1) - Charge Smart
    OPEL MERIVA : Making a grand entrance
    FORD MONDEO 2.0 ECOBOOST : Modern Mondeo
    BMW 650i COUPE : Sexy retooling of BMW's 6-series
    BMW 120d; M135i - Finely tuned
    PHP Tutorials : Storing Images in MySQL with PHP (part 2) - Creating the HTML, Inserting the Image into MySQL
    PHP Tutorials : Storing Images in MySQL with PHP (part 1) - Why store binary files in MySQL using PHP?
    Java Tutorials : Nested For Loop (part 2) - Program to create a Two-Dimensional Array
    Java Tutorials : Nested For Loop (part 1)