Hi simonapa

 

Can you show me where i put this example code in this exemple down ?  thanks 

 

</code>

 

$user = "admin"

$pass = "admin"

# added the following line to add path to proxy

$proxy = 'http://proxy.url:8080'


$base64AuthInfo = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes(("{0}:{1}" -f $user, $pass)))

# this was added to assist with SSL Trust message

[System.Net.ServicePointManager]::ServerCertificateValidationCallback = {$true}

$headers = New-Object "System.Collections.Generic.Dictionary[[String],[String]]"

$headers.Add('Authorization',('Basic {0}' -f $base64AuthInfo))

$headers.Add('Accept','application/json')

 

$uri = https://instance.service-now.com/api/now/table/incident?sysparm_limit=1

 

$method = "get"


$response = Invoke-WebRequest -Headers $headers -Method $method -Uri $uri -proxy $proxy -ProxyUseDefaultCredentials


</code>