The tool (Binary and Source code) is available on the Orchestrator Community codeplex site, http://scorch.codeplex.com
Direct Download Link: http://scorch.codeplex.com/releases/view/87676
Direct Source Code Link: http://scorch.codeplex.com/SourceControl/changeset/view/18034#230263
Any additions / suggestions are appreciated
This utility is used to manipulate ois_export files. At their base ois_export files are xml files. When you do an export of your Runbooks you are given a few options around how to handle global settings and configurations, either export them, or not.
If any of your Runbooks references any of these, they need to be exported with your Runbooks. Great, so what is the problem? When you do the export, it will export all global settings and global configurations even if they are not referenced by the exported Runbooks. This means that all of the extraneous global settings and configurations you have in your development environments for testing, demos, etc. will be included in your export and eventually imported into whatever environment you do the import in. As a best practice it is suggested that before importing your policies from development into production you first import them into an environment for sanitation. This means a manual import into an empty environment then a manual deletion of all non-referenced global settings and configurations, then another export and import into your production environment. This process is described by Charles Joy http://blogs.technet.com/b/charlesjoy/archive/2011/04/14/8-minute-demo-sanitizing-ois-exports.aspx. This means that if you have an automated process for export and imports using the COM interface you are still forced to have a manual process for sanitizing the Runbooks.
Beyond normal sanitation this utility also allows for automated setting of logging parameters (either On or Off). This means that with a simple flag you can turn off all logging for policies before they are imported into your production environment and, conversely, turning on logging for all Runbooks when they are destined for a QA or Development environment.
This tool is non-destructive. This means that it is pointed at an export file but does not modify it directly, rather it will create a new export file.
-ExportFilePath <String> : Path to the ois_export file to sanitize
-SanitizedExportFilePath <String> : Path to save the sanitized export file to
-ObjectSpecificLogging (On|Off) : Turns On or Off object specific logging for all runbooks in export file
-GenericObjectLogging (On|Off) : Turns On or generic object logging for all runbooks in export file
-DoNotSanitizeGlobals : If specified no manipulations of Globals (configurations, variables, counters etc) will be done
-Force : If set any file at SanitizedExportFilePath will be overwritten
When run without any parameters it will drop a description of how to use it
For normal utilization all you need to supply is the path to the exported file and a path where you want to store the sanitized version of the export file (use the –Force flag to overwrite any files at the destination location)
.\SanitizeExport.exe -ExportFilePath C:\temp\sanitizeTest3.ois_export –SanitizedExportFilePath C:\temp\sanitizeTest3_sanitized.ois_export -Force
The sanitized import looks like it worked flawlessly, all of the objects maintained their references and all of the referenced global settings and configurations were imported
If you would like to turn logging on or off you can specify either the –ObjectSpecificLogging (On|Off) or the –GenericObjectLogging (On|Off) flag or both. For Example, if we had wanted to turn off all logging in addition to sanitizing the export file we could specify
.\SanitizeExport.exe -ExportFilePath C:\temp\sanitizeTest3.ois_export –SanitizedExportFilePath C:\temp\sanitizeTest3_sanitized.ois_export –ObjectSpecificLogging Off –GenericObjectLogging Off –Force
Or, to turn both on we could do
.\SanitizeExport.exe -ExportFilePath C:\temp\sanitizeTest3.ois_export –SanitizedExportFilePath C:\temp\sanitizeTest3_sanitized.ois_export –ObjectSpecificLogging On –GenericObjectLogging On –Force
Enjoy and all feedback is appreciated.