Incident reporting
One more exciting thing that we can do using the Service Manager cmdlets is incident reporting. We can create a simple report of open (active and pending) incidents in System Center Service Manager 2012 and this can be easily done using the SMlets discussed earlier. However, it is good to have the option for my report to be generated by a group of users on their own machines, so it was preferable to do this using the native SCSM 2012 cmdlets (which the users already have installed as part of the SCSM 2012 installation):
Import the SCSM Native cmdlets:
Import-Module "C:\Program Files\Microsoft System Center 2012\Service Manager\Powershell\System.Center.Service.Manager.psd1"
Get the name of your SCSM server:
$MySCSMServer = "SCSM Server Name" New-SCSMManagementGroupConnection -ComputerName $MySCSMServer $objRelationshipAssignedToUser = Get-SCSMRelationship -Name "System.WorkItemAssignedToUser" $objRelationshipAffectedUser = Get-SCSMRelationship -Name "System.WorkItemAffectedUser...