Created
May 25, 2015 21:29
-
-
Save AdamNaj/82465217d12fd1ad5acf to your computer and use it in GitHub Desktop.
Export Roles and users in a package
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$package = (New-Package -Name "Security") | |
$source = Get-Role -Filter * | New-SecuritySource -Name "All Roles" | |
$package.Sources.Add($source) | |
$source = Get-User -Filter * | New-SecuritySource -Name "All Users" | |
$package.Sources.Add($source) | |
$source = New-SecuritySource -Filter sitecore\* -Name "Sitecore Roles and users" -AccountType Unknown | |
$package.Sources.Add($source) | |
Export-Package "Security" -Project $package |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment