Steps followed Create an empty PowerShell Workflow container named as shown in image below. Add Input Parameters from Initialize Data Activity to SMA Workflow Parameters as shown in lines 34-57 below. Analyze the Orchestrator Control Runbook for loops, break conditions and jump statements. Prepare an algorithm based on the Runbook as shown below: Algorithm derived from Orchestrator Runbook: ‘Initiate-Validation’ Invoke SMA Worklfow. If succeeds then continue else go to step K ‘True’ If CreateNewService parameter is got to step E ‘False, If CreateNewService parameter is invoke SMA worklow. If succeeds then continue else go to step K ‘Service ‘True’ IF Exists’ is then go to Step F ‘Service ‘False’, ‘Initiate-CreateAzureService’ If Exists’ is Invoke SMA Workflow. If succeeds then continue else go to step K ‘Initiate-CheckCloudStorageName’. Invoke If succeeds then continue else go to step K ‘True’, If storage exists is go to step I ‘False’, ‘Initiate-NewStorageAccount’. If storage exists is then invoke If succeeds then continue else go to step K ‘Initiate-CreateWindowsVM’ Invoke SMA workflow. If succeeds then continue else go to step K ‘Initiate-GetRDPFile’ Invoke SMA Workflow. If succeeds then go to step L else go to step K Write Error and Break execution End Convert the above created algorithm into a PowerShell workflow script and ‘Initiate-NewWindowsVM’. create a Main SMA Workflow The final SMA Workflow script will look like below:
Steps followed Create an empty PowerShell Workflow container named as shown in image below. Add Input Parameters from Initialize Data Activity to SMA Workflow Parameters as shown in lines 34-57 below. Analyze the Orchestrator Control Runbook for loops, break conditions and jump statements. Prepare an algorithm based on the Runbook as shown below: Algorithm derived from Orchestrator Runbook: Invoke ‘Initiate-Validation’ SMA Worklfow. If succeeds then continue else go to step K If CreateNewService parameter is ‘True’ got to step E If CreateNewService parameter is ‘False, invoke SMA worklow. If succeeds then continue else go to step K IF ‘Service Exists’ is ‘True’ then go to Step F If ‘Service Exists’ is ‘False’, Invoke ‘Initiate-CreateAzureService’ SMA Workflow. If succeeds then continue else go to step K Invoke ‘Initiate-CheckCloudStorageName’. If succeeds then continue else go to step K If storage exists is ‘True’, go to step I If storage exists is ‘False’, then invoke ‘Initiate-NewStorageAccount’. If succeeds then continue else go to step K Invoke ‘Initiate-CreateWindowsVM’ SMA workflow. If succeeds then continue else go to step K Invoke ‘Initiate-GetRDPFile’ SMA Workflow. If succeeds then go to step L else go to step K Write Error and Break execution End Convert the above created algorithm into a PowerShell workflow script and create a Main SMA Workflow ‘Initiate-NewWindowsVM’. The final SMA Workflow script will look like below:
DC%20Automation%20Datacenter%20Automation%20Framework.docx