The following example displays the automation status.



# Get the current automation status.

$status = $automation.GET_AutomationStatus();

if ($status.IsActive -eq $false)

{

    Write-Host "There is currently no active profile executing.";

    return;

}



# Display the status.

Write-Host "Automation Status";

Write-Host "------------------------------";

Write-Host "Account Name: $($status.AccountName)";

Write-Host "Profile: $($status.ProfileDisplayName)";

Write-Host "Elapsed Time: $($status.ElapsedTimeString)";

Write-Host "Last Action: $($status.LastAction)";

 


 

NOTE: This is functionally equivalent to the method with the same name in the administration web service.