Microsoft Office Tutorials and References
In Depth Information
Completing Orchestrator integration and finalizing a runbook
15. For the second Run .Net Script activity, we will use the Windows PowerShell script
in the .Net Script activity properties windows, as shown in Figure 8-22, to assign a
license to a new user. Enter the following Windows PowerShell script. Change the
three variables (right-click Subscribe) created earlier for ADFS-Server, Admin-Name,
and Admin-Password for Office 365 access. Make sure to remove the quotes on each
$ErrorActionPreference = "Stop"
$DomainPassword = ConvertTo-SecureString "ADMIN-Password" -AsPlainText
$DomainCred = New-Object -TypeName System.Management.Automation.PSCredential
-ArgumentList "Admin-Name",$DomainPassword
$Result = Invoke-Command -ComputerName "ADFS-Server" -Credential $Domain-
Cred -ScriptBlock {
-command "& Connect-MsolService" "& Get-MsolUser -UnlicensedUsersOnly |
SetMsolUser -UsageLocation us" "& Get-MsolUser -UnlicensedUsersOnly | Set-MsolU-
serLicense -AddLicenses uclabs:ENTERPRISEPACK"
Throw $_.Exception
16. The next action you need to complete is to update the Service Request in Service
Manager to indicate that the runbook has completed and the service request is
closed. In the Orchestrator activity, select Connection for your Service Manager server
activity and then:
a. Click the ellipses and select the manual activity.
b. Select the Object Guid published data to ActivityGUID from Initialize Data.
c. Click the Select optional fields button, then select status. Finally, in the status
box click the ellipses and set the status to Completed.
This final activity in the runbook updates the request in Service Manager to close this
instance of the request.
Search JabSto ::

Custom Search