Understand how to use Powershell in Anaplan XL.
Connect and get repo info
Get-XL3Repository -BaseUri http://localhost/AnaplanXLWebAnaplanXLWeb
Get list of folders on the root
Get-XL3Folders -BaseUri http://localhost/xlcubedweb
Get list of reports in the first folder of site
$folders = Get-XL3Folders -BaseUri http://localhost/AnaplanXLWeb Get-XL3Reports -BaseUri http://localhost/AnaplanXLWeb -Path $folders[0].Path
Copy reports from "Test1" folder on one server to the "Test2" folder on another server
$reports = Get-XL3Reports -BaseUri http://localhost/AnaplanXLWeb -Path 'Test1' foreach($rep in $reports) { $data = Select-XL3Reports -BaseUri http://localhost/AnaplanXLWeb -Path $rep.Path Add-XL3Reports -BaseUri http://somenewserver/AnaplanXLWeb -Path 'Test2' -Data $data -Name $rep.Name }
Copy reports between servers and update the connection servers
$reports = Get-XL3Reports -BaseUri http://localhost/AnaplanXLWeb -Path 'Test1' foreach($rep in $reports) { $data = Select-XL3Reports -BaseUri http://localhost/AnaplanXLWeb -Path $rep.Path # Get the connections in the file $conns = Get-XL3Connections -data $data foreach($conn in $conns) { # update server - note the specific format to still support excel range vs literal values $conn.Server = '<value>newserver</value>' } # Update the connection in the report data $data = Set-XL3Connections -data $data -Connections $conns # send to new server Add-XL3Reports -BaseUri http://newserver/AnaplanXLWeb -Path 'Test2' -Data $data -Name $rep.Name }