Homeβ€Ί Advanced Request Offering

Two Questions regarding ARO/ Powershell

Ryan_KelleyRyan_Kelley Customer IT Monkey ✭
  1. Is there a way to find MAs, RAs, ect outside of looking the tickets by title?
  2. Is there a way to update a PowerShell AC once a ticket has been kicked off? I updated the PowerShell script

context: I use the PowerShell scripts with PowerShell templates. I usually find MAs ect by search titles - find title like this and do this action.

Also, Sometimes I want to make a script change on the fly. How would I change the script but keep the current workflow of the SR?

Thank you!

Best Answers

  • Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭
    Answer βœ“
    1. An efficient way to find certain activities is the child Id - This Child ID is unique in templates (I don't know what happens when you copy a template with the SCSM task, but I have never used it).
    2. We also have this issue sometimes - mostly whenever I didn't recognize a script error and published the activity πŸ™ˆ The easiest way is to receive the activity, get the PowerShellScript property and change it. But this is risky as you could "destroy" the activity with it.

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    Answer βœ“

    The newer versions of the Portal won't let you change the PowerShell code once the ticket is created for security reasons. It will ignore changes submitted because an analyst could change it to any PowerShell script and potentially take rouge actions on the server.

    I have used the Notes field on an MA / RA to find them in a script using a token like {{LineManagerRA}} or {{DeploymentMA}} and then

    Get-SCSMRelatedObject -SMObject $SR -Relationship $WIContainsActivityRel @SCSM | Where-Object {$_.Notes -eq "{{LineManagerRA}}"}
    

    Geoff

Answers

  • Simon_ZeinhoferSimon_Zeinhofer Customer Ninja IT Monkey ✭✭✭✭
    Answer βœ“
    1. An efficient way to find certain activities is the child Id - This Child ID is unique in templates (I don't know what happens when you copy a template with the SCSM task, but I have never used it).
    2. We also have this issue sometimes - mostly whenever I didn't recognize a script error and published the activity πŸ™ˆ The easiest way is to receive the activity, get the PowerShellScript property and change it. But this is risky as you could "destroy" the activity with it.

  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    Answer βœ“

    The newer versions of the Portal won't let you change the PowerShell code once the ticket is created for security reasons. It will ignore changes submitted because an analyst could change it to any PowerShell script and potentially take rouge actions on the server.

    I have used the Notes field on an MA / RA to find them in a script using a token like {{LineManagerRA}} or {{DeploymentMA}} and then

    Get-SCSMRelatedObject -SMObject $SR -Relationship $WIContainsActivityRel @SCSM | Where-Object {$_.Notes -eq "{{LineManagerRA}}"}
    

    Geoff

Sign In or Register to comment.