Powershell Set-SCSMObject decimal value issue

Nov 21, 2012 at 10:00 AM
Edited Nov 21, 2012 at 10:00 AM

Dear discussion participants,

i got an issue updating decimal values with smlets beta 4 - Set-scsmobject

following error is raised:

VERBOSE: Want to set Cost(decimal) to 56454.58
VERBOSE: Could not find type setter for decimal
Set-SCSMObject : PropertySetterNotFound
At line:1 char:15
+ Set-SCSMObject <<<<  $hwobj -Property cost -Value "56454.58" -WhatIf -Verbose
    + CategoryInfo          : ObjectNotFound: (decimal:String) [Set-SCSMObject], ItemNotFoundException
    + FullyQualifiedErrorId : No such property setter,SMLets.SetSMObjectCommand

VERBOSE: Adding 130bffaf-4f0b-c821-6eaf-b87c2eda5f5b to change list

Any solution possible?

Regards Chris



Nov 21, 2012 at 10:52 AM
Edited Nov 21, 2012 at 11:24 AM

Found that is not supported in public void AssignNewValue(ManagementPackProperty p, EnterpriseManagementSimpleObject so, object newValue)

                    WriteVerbose("Could not find type setter for " + PropertyType);
                    WriteError(new ErrorRecord(new ItemNotFoundException("PropertySetterNotFound"), "No such property setter", ErrorCategory.ObjectNotFound, PropertyType));

I added support for it, rebuild solution and test it - seams to be working