The following example gets the unique identifiers of the automation profiles to which the user has permission in GUID format. 


The unique identifier is converted to the display name of the automation profile.




# Get the unique identifiers of the automation profiles to which the user has permissions.

$identifiers = $automation.GET_AutomationProfileIdentifiers();

foreach ($identifier in $identifiers)

{

    $displayName = $automation.GET_AutomationProfileDisplayName($identifier);

    Write-Host "$($displayName) - $($identifier)";

}



NOTE: The automation profile must have web service access enabled to be displayed in the results.