-
-
Save RIKIKU/c3fb769b1e2466df83fbdf6d138b4f23 to your computer and use it in GitHub Desktop.
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
$orgs = Import-Clixml "C:\CRMOrgs.xml" #Put the Literal Path to your Orgs Path here | |
$SQLServerName = "Example\exampleinstance" # The SQLServername\Instance name of the new server goes here | |
$SRSurl = "http://Example/reportserver" # reporting services URL of the new server goes here. | |
Add-PSSnapin Microsoft.crm.powershell | |
$jobs = @() | |
foreach($org in $orgs) | |
{ | |
try | |
{ | |
$jobs += Import-CrmOrganization -SqlServerName $SQLServerName -SrsUrl $SRSurl -DatabaseName $($org.DatabaseName) -DisplayName $($org.FriendlyName) -Name $($org.UniqueName) -UserMappingMethod ByAccount | |
} | |
catch | |
{ | |
$Error[0] | |
Write-Output $($org.DatabaseName) | |
} | |
} | |
$jobs.GetEnumerator() | Get-CrmOperationStatus |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment