< Back

Import-GPOPermissionsFromJson

Fri Jan 10, 2020 7:07 pm

NAME Import-GPOPermissionsFromJson



SYNOPSIS

Imports Group Policy object permissions information from a JSON file and applies them to applicable GPOs.





SYNTAX

Import-GPOPermissionsFromJson [-Path] <String> [[-Domain] <String>] [-Credential <PSCredential>]

[<CommonParameters>]





DESCRIPTION

The cmdlet uses a backup of GPO permissions written to a json file recreate permissions on exported GPOs.





PARAMETERS

-Path <String>

The location of the json file containing the Group Policy permissions. This file is created with the

Export-GPOBackupsAndWmiFilters cmdlet. It can also be created manually.



Required? true

Position? 1

Default value

Accept pipeline input? true (ByValue)

Accept wildcard characters? false



-Domain <String>

The domain to import the Group Policy object permissions to. 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



-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.



The Set-GPPermission cmdlet used in this function does not accept a Credential parameter, so the user

privileges must have permissions to at least perform those functions. Other functions will be executed with

the specified credentials.



Required? false

Position? named

Default value [System.Management.Automation.PSCredential]::Empty

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

System.String





OUTPUTS

None





NOTES





AUTHOR: Michael Haken

LAST UPDATE: 1/4/2017



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Import-GPOPermissionsFromJson -Path "c:\\GPOBackups\\GPPermissions.json" -Domain "contoso.com"



Imports the Group Policy permissions stored at c:\\GPOBackups\\GPPermissions.json that were backed up to that path

with Export-GPOBackupsAndWmiFilters to contoso.com.











RELATED LINKS