cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Exporting Site Information

paulo_morgado
Participant

My users frequently ask me what is the definition of the location sites loaded in DCRUM, so I though of parsing the location-*.config files and producing an HTML page for them to check out the site location information.

Then I though of looking in the database to see where this information is and I found it.

In the attached package, Get-Locations.ps1 is a Powershel script that gets from the database an XML document with the site location information.

Locations.xslt is an XML Stylesheet that transforms the XML in HTML. There's also a few more auxiliary stylesheets.

Export-Locations.ps1 is a Powershel script that gets the locations and produces the HTML output. 

To automate it, I've created a task to run the script every hour:

 <task ID="export_locations" name="Export Location Information - HTML" periodType="HOUR" period="1" timeLine="SERVER" offsetTime="00:01" timeout="00:15" recoverable="true">
  <command ID="0" name="Export Location Information">">
   <class>adlex.delta.scheduler.command.ShellCommand</class>
   <param>C:\Windows\system32\WindowsPowerShell\v1.0\powershell.exe</param>
   <param>-Version</param>
   <param>3.0</param>
   <param>-NoLogo</param>
   <param>-NoProfile</param>
   <param>-InputFormat</param>
   <param>Text</param>
   <param>-NonInteractive</param>
   <param>-File</param>
   <param>C:\Scripts\Export Configurations\Export-Locations.ps1</param>
  </command>
 
 </task>

Export-Locations.zip

Feel free to use and comment on it

2 REPLIES 2

paulo_morgado
Participant

I'm also trying to do the same for Business Units and Software Services, in case anyone want's to help.

paulo_morgado
Participant

By the way, to publish, I just dropped the html file under <server>/wwwroot/config and they are accessed via http://<server>/config/...