Home Asset Management
Options

Changing Organization Names

Mike_BrancoMike_Branco Customer IT Monkey ✭

Hello,

In Asset Management, Organizations, All Organizations, there are a few organizational names that have changed in the past few years. It appears that they cannot be edited in the Service Manager Console, so I am wondering if there is a powershell script to make the changes on the back-end? I have seen some people create new organizations and link any items to that, but I feel like that may be more difficult than changing the name on the current item.

Any help would be appreciated. Thank you in advanced.

Answers

  • Options
    Mike_BrancoMike_Branco Customer IT Monkey ✭

    In addition to this, I have a script narrowed down to be able to get the display name, just need a way to set it.

    $classorg = get-scsmclass -name "Cireson.AssetManagement.Organization"

    $OrgName = Get-scsmobject -class $classorg | where-object {$_.DisplayName - like "orgname"}

    (the data stored in orgname at this point is class name, display name and last modified.

    Then using a simple $orgname.displayname it gets narrowed down to just having the display name.


    How would I go about setting "orgname" to a new name.

  • Options
    Adam_DzyackyAdam_Dzyacky Product Owner Contributor Monkey ✭✭✭✭✭

    On Organizations, the Name is a Key property which is to say it cannot be changed. However, the DisplayName is not a key property and thus can be changed.

    That said, you are terrifically close on how to change the DisplayName.

    $classorg = get-scsmclass -name "Cireson.AssetManagement.Organization$"
    $OrgName = Get-scsmobject -class $classorg -filter "DisplayName -eq 'OrgName'"
    Set-SCSMObject -smobject $orgName -Property "DisplayName" -value "NewOrgName"
    


  • Options
    Geoff_RossGeoff_Ross Cireson Consultant O.G.

    You have to be careful with this as if you open and save the Organisation in the Portal the DisplayName is reset to the Name value.

Sign In or Register to comment.