ActiveReports Server provides a Migration PowerShell Module sample to migrate resources (reports, models, roles, or other resources) from one server to another. This sample provides a list of commands to enable users to choose the resources to migrate. You can find the Migration PowerShell Module sample at the following location.
C:\ActiveReports 12 Server\SDK\Samples\Migration PowerShell Module
Open the Windows PowerShell console.
Enter the following command:
cd "%\Samples\Migration PowerShell Module"
PS C:\> Set-ExecutionPolicy Unrestricted -Scope CurrentUser
PS C:\> Import-Module .\ArsMigration.psd1
PS C:\> Get-Command -Module ArsMigration
Available commands
Exports the data from ActiveReports Server.
Syntax | Export-ArsData [[-Types] <String[]>] [-Path] <String> [[-Session] <PSObject>] [<CommonParameters>] |
Parameters |
-Types <String[]>: The types of resources to export. If not specified all supported resources are exported.
Note: To export all the roles, the roles Types parameter should be specified as '$roles'.
-Path <String>: The output file in which to store the exported archive. -Session <PSObject>: The session object for the target server. <CommonParameters>: This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters. |
Required Parameter | Path |
Examples |
|
Retrieves the list of resources of the specified type from ActiveReports Server.
Syntax | Get-ArsList [-Type] <String> [[-Session] <PSObject>] [<CommonParameters>] |
Parameters |
-Type <String>: The type of resources to list. -Session <PSObject>: The session object for the target server. <CommonParameters>: This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters. |
Required Parameter | Type |
Examples |
|
Retrieves the content of the specified resource.
Syntax | Get-ArsResource [-Id] <String> [-Type] <String> [[-Path] <String>] [-Description] [[-Session] <PSObject>] [<CommonParameters>] |
Parameters |
-Id <String>: The ID of the resource. -Type <String>: The type of resource. -Path <String>: The path to the output file. -Description [<SwitchParameter>]: -Session <PSObject>: The session object for the target server. <CommonParameters>: This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters. |
Required Parameter |
Id Type |
Examples |
|
Imports the previously exported data from the specified file to the target ActiveReports Server.
Syntax | Import-ArsData [-Path] <String> [[-Session] <PSObject>] [<CommonParameters>] |
Parameters |
-Path <String>: The path to the exported archive.
-Session <PSObject>: The session object for the target server. <CommonParameters>: This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters. |
Required Parameter | Path |
Examples |
|
Migrates a single resource from one server to another.
Syntax | Migrate-ArsResource [-Type] <String> [-Id] <String> [[-From] <PSObject>] [[-To] <PSObject>] [-SkipValidation] [<CommonParameters>] |
Parameters |
-Type <String>: The resource type to migrate. -Id <String>: The resource ID of the resource being migrated. -From <PSObject>: The session object specifying the server to migrate data from. -To <PSObject>: The session object specifying the server to migrate data to. -SkipValidation [<SwitchParameter>] <CommonParameters>: This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters. |
Required Parameter |
Id Type |
Examples |
|
Migrates all resources of the specified type.
Syntax | Migrate-ArsResources [[-Type] <String[]>] [[-From] <PSObject>] [[-To] <PSObject>] [<CommonParameters>] |
Parameters |
-Type <String[]>: The resource type to migrate.
Note: To migrate all the roles, the roles Types parameter should be specified as '$roles'.
-From <PSObject>: The session object specifying the server to migrate data from. -To <PSObject>: The session object specifying the server to migrate data to. <CommonParameters>: This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters. |
Required Parameter | Null |
Examples |
|
Uploads the resource to the ActiveReports Server.
Syntax |
|
Parameters |
-Name <String>: The name of the new resource. -Type <String>: The type of the new resource. -Path <String[]>: The path to the file to upload. -Content <Array>: The contents of the resource as an array. -Overwrite [<SwitchParameter>]: Specifies whether to overwrite any existing resource with the same name. -SkipValidation [<SwitchParameter>] -Session <PSObject>: The session object for target server. <CommonParameters>: This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters. |
Required Parameter |
Type Path Content |
Examples |
|
Creates a session using the specified user credentials and ActiveReports Server URI.
Syntax | New-ArsSession [-User] <String> [-Password] <String> [[-Uri] <String>] [-Default] [<CommonParameters>] |
Parameters |
-User <String>: The user name for the session. -Password <String>: The password of the specified user. -Uri <String>: The server URI. -Default [<SwitchParameter>]: Specifies whether to set the result as the default session for other cmdlets. <CommonParameters>: This cmdlet supports these common parameters: Verbose, Debug, ErrorAction, ErrorVariable, WarningAction, WarningVariable, OutBuffer, PipelineVariable, and OutVariable. For more information, see About CommonParameters. |
Required Parameter |
User Password |
Examples |
|
PS C:> Get-Help <Command> -Full
Place the module files into the following directory:
$Home\Documents\WindowsPowerShell\Modules\ArsMigration