File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed
Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -850,6 +850,11 @@ function New-PrtgResult {
850850# a single prtgshell object object
851851# or an array of prtgshell object objects
852852
853+
854+ # for handling objects
855+ # needs to string together the objids from the objects received
856+ # and then in the END block, execute the actual DO
857+
853858function Remove-PrtgObject {
854859 <#
855860 . SYNOPSIS
@@ -862,7 +867,7 @@ function Remove-PrtgObject {
862867
863868 Param (
864869 [Parameter (Mandatory = $True , Position = 0 )]
865- $ObjectId
870+ [ int []] $ObjectId
866871 # TODO: document this; $ObjectID for this cmdlet can either be a single integer or a comma-separated string of integers to handle multiples
867872 )
868873
@@ -871,6 +876,8 @@ function Remove-PrtgObject {
871876 }
872877
873878 PROCESS {
879+ [string ]$ObjectId = $ObjectId -join " ,"
880+
874881 $Url = $PrtgServerObject.UrlBuilder (" deleteobject.htm" , @ {
875882 " id" = $ObjectId
876883 " approve" = 1
You can’t perform that action at this time.
0 commit comments