When using AutoTask’s API it’s required to lookup a various amount of picklist values that are used in updating you’re web request. This is a powershell way to pull those picklist values. The first part of the script validates your AT URI, the second part gets the entity data, in this case I was looking for “ticket” related fields.

Edit: Updated to give a more friendly output

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
# Username and password for Autotask
$ATusername = "{AT Username}"
$ATpassword = ConvertTo-SecureString "{AT Password}" -AsPlainText -Force
$ATcredentials = New-Object System.Management.Automation.PSCredential($ATusername,$ATpassword)
 
$atws = New-WebServiceProxy -URI $ATurl -Credential $ATcredentials
$zoneInfo = $atws.getZoneInfo($ATusername)
$ATurl = $zoneInfo.URL.Replace(".asmx",".wsdl")
$atws = New-WebServiceProxy -URI $ATurl -Credential $ATcredentials
  
$entity= $atws.getFieldInfo("Ticket")
  
foreach ($picklist in $entity) {
    $picklist | select Name,Label,Description | ft
    foreach ($values in $picklist.PicklistValues) { $values | select Label,Value,IsActive }
}
 
$output= $atws.getThresholdAndUsageInfo()
$output.EntityReturnInfoResults.message