< Back
Import-FullGPOBackups
Post
NAME Import-FullGPOBackups
SYNOPSIS
Restores all most recent GPO backups stored under a given path and reassociates WMI filters to the GPO.
SYNTAX
Import-FullGPOBackups [-Path] <String> [[-Domain] <String>] [[-MigrationTablePath] <String>] [-Credential
<PSCredential>] [-CimSession <CimSession>] [<CommonParameters>]
DESCRIPTION
The cmdlet recursively searches the provided path for GPO backups. Once a backup is found, it is imported into the
provided domain. After the import, the GPO Report XML
is utilized to identify any WMI filters that were used, and reassociates those WMI filters to the GPO if they
exist in the domain. This command is useful for restoring GPOs that
were backed up natively and restoring them to a new domain after the WMI filters have been imported.
PARAMETERS
-Path <String>
The base path to start searching from.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Domain <String>
The domain to import the GPOs into. This defaults to the domain of the current user.
Required? false
Position? 2
Default value [System.String]::Empty
Accept pipeline input? false
Accept wildcard characters? false
-MigrationTablePath <String>
Optionally specify a migration table to be used to conduct the GPO import.
Required? false
Position? 3
Default value [System.String]::Empty
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Specifies a user account that has permission to perform this action. The default is the current user.
Type a user name, such as "User01" or "Domain01\\User01", or enter a PSCredential object, such as one generated
by the Get-Credential cmdlet. If you type a user name, you will be prompted for a password.
Required? false
Position? named
Default value [System.Management.Automation.PSCredential]::Empty
Accept pipeline input? false
Accept wildcard characters? false
-CimSession <CimSession>
Specifies the CIM session to use for this cmdlet. Enter a variable that contains the CIM session or a command
that creates or gets the CIM session, such as the New-CimSession or Get-CimSession cmdlets. For more
information, see about_CimSessions.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
None
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 1/8/2017
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Import-FullGPOBackups -Path "c:\\GPOBackups" -Domain "contoso.com"
Import all of the backups contained in the folder structure to contoso.com and associate any WMI filters.
RELATED LINKS
SYNOPSIS
Restores all most recent GPO backups stored under a given path and reassociates WMI filters to the GPO.
SYNTAX
Import-FullGPOBackups [-Path] <String> [[-Domain] <String>] [[-MigrationTablePath] <String>] [-Credential
<PSCredential>] [-CimSession <CimSession>] [<CommonParameters>]
DESCRIPTION
The cmdlet recursively searches the provided path for GPO backups. Once a backup is found, it is imported into the
provided domain. After the import, the GPO Report XML
is utilized to identify any WMI filters that were used, and reassociates those WMI filters to the GPO if they
exist in the domain. This command is useful for restoring GPOs that
were backed up natively and restoring them to a new domain after the WMI filters have been imported.
PARAMETERS
-Path <String>
The base path to start searching from.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Domain <String>
The domain to import the GPOs into. This defaults to the domain of the current user.
Required? false
Position? 2
Default value [System.String]::Empty
Accept pipeline input? false
Accept wildcard characters? false
-MigrationTablePath <String>
Optionally specify a migration table to be used to conduct the GPO import.
Required? false
Position? 3
Default value [System.String]::Empty
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Specifies a user account that has permission to perform this action. The default is the current user.
Type a user name, such as "User01" or "Domain01\\User01", or enter a PSCredential object, such as one generated
by the Get-Credential cmdlet. If you type a user name, you will be prompted for a password.
Required? false
Position? named
Default value [System.Management.Automation.PSCredential]::Empty
Accept pipeline input? false
Accept wildcard characters? false
-CimSession <CimSession>
Specifies the CIM session to use for this cmdlet. Enter a variable that contains the CIM session or a command
that creates or gets the CIM session, such as the New-CimSession or Get-CimSession cmdlets. For more
information, see about_CimSessions.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
None
OUTPUTS
None
NOTES
AUTHOR: Michael Haken
LAST UPDATE: 1/8/2017
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Import-FullGPOBackups -Path "c:\\GPOBackups" -Domain "contoso.com"
Import all of the backups contained in the folder structure to contoso.com and associate any WMI filters.
RELATED LINKS