Quantcast
Channel: SCSM PowerShell Cmdlets
Viewing all articles
Browse latest Browse all 306

Created Issue: Enumeration field not being updated with Set-SCSMObject [9403]

$
0
0
Hi, I'm testing the latest version (beta 3). When I want to update an enumeration field it doesn't fail, but it's not updating the field.

Is there something wrong that I'm missing?

PS C:\> $inc

ClassName DisplayName LastModified
--------- ----------- ------------
System.WorkItem.Incident IR93218 - Enterprise Systems - Daily Metrics... 10/25/2011 11:20:11 AM

PS C:\> $inc.Classification

ordinal name displayname
------- ---- -----------
40 IncidentClassificationEnum.Other Other

PS C:\> $IncidentClassif

ordinal name displayname
------- ---- -----------
12.5 Enum.379e4ebc9d8c46f0b33e9307c697cfe4 Database

PS C:\> $inc |Set-SCSMObject -Property Classification -Value $IncidentClassif -ComputerName $MS -verbose
VERBOSE: Want to set Classification(enum) to Enum.379e4ebc9d8c46f0b33e9307c697cfe4
VERBOSE: Looking Enum via string Enum.379e4ebc9d8c46f0b33e9307c697cfe4 in IncidentClassificationEnum
VERBOSE: found enum: Enum.379e4ebc9d8c46f0b33e9307c697cfe4
VERBOSE: set the value
VERBOSE: Adding 4f8d41bd-1b47-0f0b-c468-3e3aece592ed to change list
VERBOSE: Performing operation "Set-SCSMObject" on Target "SMObjects".

PS C:\> $inc.Classification

ordinal name displayname
------- ---- -----------
40 IncidentClassificationEnum.Other Other

PS C:\> $IncidentClassifId = $IncidentClassif.Id

PS C:\> $inc |Set-SCSMObject -Property Classification -Value $IncidentClassifId -ComputerName $MS -verbose
VERBOSE: Want to set Classification(enum) to 5db4ea14-8e93-8e47-f50d-2ad3d05e62ea
VERBOSE: Looking Enum via string 5db4ea14-8e93-8e47-f50d-2ad3d05e62ea in IncidentClassificationEnum
VERBOSE: found enum: Enum.379e4ebc9d8c46f0b33e9307c697cfe4
VERBOSE: set the value
VERBOSE: Adding 4f8d41bd-1b47-0f0b-c468-3e3aece592ed to change list
VERBOSE: Performing operation "Set-SCSMObject" on Target "SMObjects".

PS C:\> $inc.Classification

ordinal name displayname
------- ---- -----------
40 IncidentClassificationEnum.Other Other

PS C:\> $inc |Set-SCSMObject -ComputerName $MS -PropertyHashtable @{Classification = $IncidentClassifId} -verbose
VERBOSE: Want to set Classification(enum) to 5db4ea14-8e93-8e47-f50d-2ad3d05e62ea
VERBOSE: Looking Enum via string 5db4ea14-8e93-8e47-f50d-2ad3d05e62ea in IncidentClassificationEnum
VERBOSE: found enum: Enum.379e4ebc9d8c46f0b33e9307c697cfe4
VERBOSE: set the value
VERBOSE: Adding 4f8d41bd-1b47-0f0b-c468-3e3aece592ed to change list
VERBOSE: Performing operation "Set-SCSMObject" on Target "SMObjects".

PS C:\Users\minig1> $inc.Classification

ordinal name displayname
------- ---- -----------
40 IncidentClassificationEnum.Other Other



Thanks!

Viewing all articles
Browse latest Browse all 306

Trending Articles



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