Skip to content

Instantly share code, notes, and snippets.

@techdecline
Last active December 4, 2018 12:47
Show Gist options
  • Select an option

  • Save techdecline/d3a8c7c7175a1d9a3bd95721fed141bb to your computer and use it in GitHub Desktop.

Select an option

Save techdecline/d3a8c7c7175a1d9a3bd95721fed141bb to your computer and use it in GitHub Desktop.
param (
[String]$SecretKey,
[String]$CollectionId,
[String]$ResourceName,
[String]$WebServiceUrl
)
# Connect to Web Service
try {
$URI = $WebServiceUrl
$Web = New-WebServiceProxy -Uri $URI -ErrorAction Stop
# Invoke method
$Web.RemoveCMDeviceFromCollection($SecretKey,$ResourceName,$CollectionId)
}
catch [System.Management.Automation.ActionPreferenceStopException] {
return $false
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment