Home Powershell Activity

PowerShell Activity - SR AffectedUser

Paul_DalkinPaul_Dalkin Member IT Monkey ✭
HI, just in the very early days of experimenting with this - if the PS Activity is contained within the WF of a SR, will it take the AU 'as is' for the functionality required (e.g. setting an expanded Exchange mailbox quota) or will the AffectedUser need to invoked in the script from the parent SR work item before carrying out the work required?

Best Answer

Answers

  • Paul_DalkinPaul_Dalkin Member IT Monkey ✭
    Thanks Brian!
  • Alexander_BeckerAlexander_Becker Customer IT Monkey ✭
    Hi Brian, i used your Script and recieved the following error: "Cannot bind argument to parameter 'Class' because it is null." When i try to run your script direct from the powershell console, your script is working. Do you have a solution for the problem?
  • Brian_WiestBrian_Wiest Customer Super IT Monkey ✭✭✭✭✭
    Do you have SMLets installed on your primary management server? and are you testing SMlets while logged in as the workflow account? I have run into edge cases where SMLets will only install as the logged in user profile as not as everyone. So its best to log in as the service account and test running powershell in a non admin console and see if it loads the module. 
  • Robin_FaklerRobin_Fakler Customer IT Monkey ✭

    Alexander please try to use the ID of the used SCSM Class instead of the name:

    $SCSMclassSR = Get-SCSMClass -Name "System.WorkItem.ServiceRequest$" # Error: Cannot bind argument to parameter 'Class' because it is null.
    $SCSMclassSR = Get-SCSMClass -ID "04B69835-6343-4DE2-4B19-6BE08C612989"  # Working

  • Alexander_BeckerAlexander_Becker Customer IT Monkey ✭

    thank you. I used the ID instead of the name and now it works.

Sign In or Register to comment.