Home Powershell Activity

Error AC Get-SCRelationshipClass

I use PS script and I have CMDlet

$affectedUserRelClass = Get-SCSMRelationshipClass -Name System.WorkItemAffectedUser

I have error

An error was written to the Error stream!

The term 'Get-SCRelationshipClass' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.

System.Center.Service.Manager


When I user this CMDlet without AC it work, but in AC it don't work, what it can be?

Answers

  • Robin_FaklerRobin_Fakler Customer IT Monkey ✭
    edited October 2019

    I solved this issue with the following import:

    Import-Module "C:\Program Files\Microsoft System Center 2012 R2\Service Manager\Microsoft.EnterpriseManagement.Core.Cmdlets.dll"
    
Sign In or Register to comment.