The forum isn't allowing me to create a new post...tried from 3 browsers and 2 OSes...so I'm going to try hi-jacking my previous post:
I'm hoping for some help understanding ADSK Web Services, specifically how specify package servers that a package is assigned to.
I have it mostly working, but can't seem to get the API to let me add a package server without specifying a "Package Destination Location on Package Servers" (which I've learned is aka sPackageServerLocation in the XML). In the GUI you can leave that field blank to take the default (specific to each package server?), but I can't post from the ADSK without specifying a value, and haven't determined how to specify a blank/null/default value.
I'm trying PoshAltiris but this isn't an issue with the PowerShell Module as I can recreate it by using Invoke-RestMethod or even using the web interface and entering values there. I think Web Services represents that blank "default" value for sPackageServerLocation in the XML as <PackageDirectory/>, with no associated value. I just can't get my request to mimic that. I've tried specifying the sPackageServerLocation value in the request as 0, null, false, False, "", "0", default, $false (really grasping at straws!).
Any help will be appreciated! Thanks
The forum will not let me save a screenshot or code snipit, so code below:
#PowerShell using PoshAltiris Module
Set-SWPackageServerSettings -PackageGuid $mypackage -AssignmentType 1 -AutomaticSiteAssignment false -PackageServers $packageServer -PackageServerLocation "???" -Server $server
#vanilla PowerShell
$Body = @{
sPackageGuid = $mypackage
bAllOrSpecificPackageServers = $false
sPackageServerGuids = $packageServer
#sPackageServerLocation = "???"
}
$WebServiceUrl = "altiris/ASDK.NS.SoftwareDelivery/SWDSolnPackageManagementService.asmx/SetPackageExPackageServerOptions"
Invoke-RestMethod -Uri "https://$server/$WebServiceUrl" -Method Post -Body $Body -UseDefaultCredentials