I want to be able to Modify the value of a Volume Custom Property but can not seem to find the correct SWIS VERB syntax.
# Get the Node information I need
$NODE = Get-SwisData $swis "SELECT NodeID,Caption,SysName,DNS FROM Orion.Nodes WHERE DNS=@DNSFQDN" @{ DNSFQDN = $DNSFQDN }
$NODEID = $NODE.NodeID
#Using the NodeID QUery the volume to get the Custom Property and Everything else to check it works.
$OrionResponses = Get-SwisData $swis "SELECT Volumes.CustomProperties.BitLocker_Enabled, [AncestorDetailsUrls],[AncestorDisplayNames],[Caption],[Description],[DetailsUrl],[DetailsUrl],[DeviceId],[DiskQueueLength],[DiskReads],[DiskSerialNumber],[DiskTransfer],[DiskWrites],[DisplayName],[DisplayName],[FullName],[Icon],[Image],[Index],[InstanceSiteId],[InstanceType],[InterfaceType],[LastSync],[MinutesSinceLastSync],[NextPoll],[NextRediscovery],[NodeID],[OrionIdColumn],[OrionIdPrefix],[PollInterval],[RediscoveryInterval],[Responding],[SCSIControllerId],[SCSILunId],[SCSIPortId],[SCSIPortOffset],[SCSITargetId],[Size],[SkippedPollingCycles],[StatCollection],[Status],[Status],[StatusDescription],[StatusIcon],[StatusIconHint],[StatusLED],[StatusLED],[TotalDiskIOPS],[Type],[UnManaged],[UnManageFrom],[UnManageUntil],[Uri],[VolumeAllocationFailuresThisHour],[VolumeAllocationFailuresToday],[VolumeDescription],[VolumeID],[VolumeIndex],[VolumePercentAvailable],[VolumePercentUsed],[VolumeResponding],[VolumeSize],[VolumeSpaceAvailable],[VolumeSpaceAvailableExp],[VolumeSpaceUsed],[VolumeType],[VolumeTypeIcon],[VolumeTypeID]
FROM Orion.Volumes WHERE NodeID=@nodeis AND DeviceID=@deviceIs" @{ nodeis = $NodeID; deviceIs = $DeviceID }
# Uncomment the line below for troubleshooting and to see what is returned
#$OrionResponses
# Construct the modify array elements
$propertyname = "Bitlocker_Enabled"
Invoke-SwisVerb $swis Orion.Volumes.CustomProperties ModifyCustomProperty @($propertyName,'true')
The result of running the script and this particular section is:
BitLocker_Enabled : True
AncestorDetailsUrls : {/Orion/NetPerfMon/VolumeDetails.aspx?NetObject=V:6238, /Orion/NetPerfMon/NodeDetails.aspx?NetObject=N:2897}
AncestorDisplayNames : {E:\ Label:SWINstalls 4C3B9FA0, MON-NETMON2}
Caption : E:\ Label:SWINstalls 4C3B9FA0
Description : Fixed Disk
DetailsUrl : /Orion/NetPerfMon/VolumeDetails.aspx?NetObject=V:6238
DetailsUrl1 : /Orion/NetPerfMon/VolumeDetails.aspx?NetObject=V:6238
DeviceId : E:
DiskQueueLength : 0
DiskReads : 0
DiskSerialNumber :
DiskTransfer : 0
DiskWrites : 0
DisplayName : E:\ Label:SWINstalls 4C3B9FA0
DisplayName1 : E:\ Label:SWINstalls 4C3B9FA0
FullName : MON-NETMON2-E:\ Label:SWINstalls 4C3B9FA0
Icon : FixedDisk.gif
Image :
Index : 7
InstanceSiteId : 0
InstanceType : Orion.Volumes
InterfaceType :
LastSync : 3/2/2018 21:53:16
MinutesSinceLastSync : 0
NextPoll : 3/2/2018 21:55:07
NextRediscovery : 3/2/2018 21:53:44
NodeID : 2897
OrionIdColumn : VolumeID
OrionIdPrefix : V:
PollInterval : 120
RediscoveryInterval : 30
Responding : Y
SCSIControllerId :
SCSILunId :
SCSIPortId :
SCSIPortOffset :
SCSITargetId :
Size : 42946523136
SkippedPollingCycles : 0
StatCollection : 15
Status : 1
Status1 : 1
StatusDescription : Up
StatusIcon : Up.gif
StatusIconHint :
StatusLED : Up.gif
StatusLED1 : Up.gif
TotalDiskIOPS : 0
Type : Fixed Disk
UnManaged : False
UnManageFrom :
UnManageUntil :
Uri : swis://MON-NetMon.stanleygroup.com/Orion/Orion.Nodes/NodeID=2897/Volumes/VolumeID=6238
VolumeAllocationFailuresThisHour : 0
VolumeAllocationFailuresToday : 0
VolumeDescription : E:\ Label:SWINstalls Serial Number 4C3B9FA0
VolumeID : 6238
VolumeIndex : 7
VolumePercentAvailable : 76.92691
VolumePercentUsed : 23.07309
VolumeResponding : Y
VolumeSize : 42946523136
VolumeSpaceAvailable : 33037434880
VolumeSpaceAvailableExp : 33037434880
VolumeSpaceUsed : 9909088256
VolumeType : Fixed Disk
VolumeTypeIcon : FixedDisk.gif
VolumeTypeID : 4
Invoke-SwisVerb : Verb Orion.Volumes.CustomProperties.ModifyCustomProperty: Not found
At C:\Users\8304\Documents\SAPIEN\PowerShell Studio\Files\Bitlocker-SAM.ps1:115 char:3
+ Invoke-SwisVerb $swis Orion.Volumes.CustomProperties ModifyCu ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Invoke-SwisVerb], FaultException`1
+ FullyQualifiedErrorId : SwisError,SwisPowerShell.InvokeSwisVerb
I tried mimicking the syntax examples for modifying the node custom properties using the Volumes. But is obviously not working. Any insights into the correct syntax would be appreciated.