i've been trying for a while now to download the xml file from the api on one of our acces points i can get it to download through a powershell internet explorer hook but the problem is that wouldnt work once put on the server in tasksheduler. the reason i had to resort to the internet explorer hook is cause it would seem the login page of the airwave controller is not made in a form and can appearantly not be called by a invoke-webrequest or a webclient which would be the only way for the script to be able to do its job while no one is logged into the server. i was wondering if anyone else has ever succesfully download from the api or if i'm just doing something wrong on the webrequest. the location of the api is on <controlerwebconnection>ap_detail.xml?id=<ID-number of the ap>.
the way that i'd like to do it would be through webrequest. i've currently been trying to work off of
$url = "https://<airwavecontroller>/ap_detail.xml?id=607"
$date = get-date
$name = $date.ToString("dMyhhmm")
$outFilePath = "C:\Users\latitude\"+$name+"raw.xml"
$web = Invoke-WebRequest -Uri $url -Credential $mycreds -OutFile $outFilePath
any pointers or even a place to start looking for a way to get this done would be really appreciated.