Quantcast
Channel: Virtual Machine Manager – General forum
Viewing all articles
Browse latest Browse all 4089

setting null value in Set-SCCustomPropertyValue

$
0
0

Hey guys,

I'm trying to delete a value in a VMM custom property field and produces an error.

$vm = get-scvirtualmachine -Name VMNAME

Set-SCCustomPropertyValue -CustomProperty (Get-SCCustomProperty -Name "ChkOutDate") -InputObject (Get-SCVirtualMachine -Name $vm) -Value $null


Produces this error.

Set-SCCustomPropertyValue : Cannot validate argument on parameter 'Value'. The argument is null. Provide a valid value for the argument, and then try running the command again.
At line:3 char:138
+ ... me $vm) -Value $null
+                    ~~~~~
    + CategoryInfo          : InvalidData: (:) [Set-SCCustomPropertyValue], ParameterBindingValidationException
    + FullyQualifiedErrorId : ParameterArgumentValidationError,Microsoft.SystemCenter.VirtualMachineManager.Cmdlets.SetCustomPropertyValueCmdlet

How am I suppose to "delete" a value. 


Viewing all articles
Browse latest Browse all 4089

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>