Skip to content

Reference between SMLets and SCSM 2012 native cmdlets

Reference between SMLets and SCSM 2012 native cmdlets published on 5 Comments on Reference between SMLets and SCSM 2012 native cmdlets

As you all know (or will know after reading of this post )) ) the SCSM 2012 have a native cmdlets which has installed during setup process of SCSM console. Some of native SCSM2012 cmdlets use different from SMLets names of the cmdlets.

The main different between SMLets and native cmdlets that native cmdlets target to wotk with SDK object and methods. Almost all native cmdlets return SDK object along with adapted PS object. So, if you want to use native cmdlets with full strange you must learn about SCSM SDK. Second effect of this is another way to update objects. See comment in table below.

To import native cmdlets you must add to your script:

Import-Module 'C:\Program Files\Microsoft System Center\Service Manager 2012\Powershell\System.Center.Service.Manager.psd1'

Table below contains SMLets cmdlets and corresponding native cmdlet, if any:

SMLets Native cmdlets Comments
Add-SCSMEnumeration    
Export-SCManagementPack
Export-SCSMManagementPack
Export-SCManagementPack
Export-SCSMManagementPack
 
Get-DataWarehouseConfiguration    
Get-SCDWDimensionTypes    
Get-SCDWFactTypes    
Get-SCDWMeasureTypes    
Get-SCDWOutriggerTypes    
Get-SCDWRelationshipFactTypes    
Get-SCDWWarehouseModuleTypes    
Get-SCGroup Get-SCGroup
Get-SCSMGroup
 
Get-SCManagementPack
Get-SCSMManagementPack
Get-SCManagementPack
Get-SCSMManagementPack
 
Get-SCManagementPackElement
Get-SCSMManagementPackElement
   
Get-SCQueue Get-SCSMQueue  
Get-SCSMAnnouncement Get-SCSMAnnouncement  
Get-SCSMCategory    
Get-SCSMChildEnumeration    
Get-SCSMClass Get-SCClass
Get-SCSMClass
SMLets use “like” operator when searching class by name. Native cmdlets use exact searching with wildcard support (* and ?).
Get-SCSMClass –Name System.WorkItem for SMLets and Get-SCSMClass –Name System.WorkItem* return the same result.
Get-SCSMClassProperty    
Get-SCSMCommand Get-SCSMCommand  
Get-SCSMConfigItem    
Get-SCSMConnectedUser    
Get-SCSMConsoleTask    
Get-SCSMEnumeration    
Get-SCSMFolder    
Get-SCSMFolderHierarchy    
Get-SCSMForm    
Get-SCSMImage    
Get-SCSMIncident   Get-SCSMClassInstance -Class (Get-SCSMClass -Name System.WorkItem.Incident)
Get-SCSMLanguagePackCulture    
Get-SCSMManagementPackReference    
Get-SCSMObject Get-SCClassInstance
Get-SCSMClassInstance
  1. SCSM 2012 allow only the PowerShell logical operators in –Filter (-eq, –ne, –gt and etc.).
  2. -Filter allow use only double-qoute sign for string value. –Filter “Id= ‘ID1234’” will NOT work. Use -Filter ‘Id = “ID1234”’ instead.
Get-SCSMObjectProjection    
Get-SCSMObjectTemplate Get-SCObjectTemplate
Get-SCSMObjectTemplate
 
Get-SCSMPage    
Get-SCSMPageSet    
get-SCSMproperty    
Get-SCSMRelatedObject   Use GetRelatedObjectsWhereSource() method of any SM object.
Get-SCSMRelationshipClass Get-SCRelationship
Get-SCSMRelationship
 
Get-SCSMRelationshipObject Get-SCRelationshipInstance
Get-SCSMRelationshipInstance
 
Get-SCSMResource    
Get-SCSMRule    
Get-SCSMRunAsAccount Get-SCRunAsAccount
Get-SCSMRunAsAccount
 
Get-SCSMSession    
Get-SCSMStringResource    
Get-SCSMSubscription Get-SCSMSubscription  
Get-SCSMTask Get-SCSMTask  
Get-SCSMTaskResult    
Get-SCSMTopLevelEnumeration    
Get-SCSMTypeProjection    
Get-SCSMUserRole Get-SCSMUserRole  
Get-SCSMUserRoleProfile    
Get-SCSMView Get-SCSMView  
Get-SCSMViewSetting    
Get-SCSMViewType    
Get-SCSMWhoAmI    
Import-SCManagementPack
Import-SCSMManagementPack
Import-SCManagementPack
Import-SCSMManagementPack
 
New-ManagementGroup    
New-SCGroup    
New-SCManagementPack
New-SCSMManagementPack
New-SCManagementPack
New-SCSMManagementPack
 
New-SCQueue    
New-SCSealedManagementPack Protect-SCManagementPack
Protect-SCSMManagementPack
 
New-SCSMAnnouncement New-SCSMAnnouncement  
New-SCSMColumn    
New-SCSMFolder    
New-SCSMIncident    
New-SCSMManagementPackReference    
New-SCSMNotificationSubscription    
New-SCSMObject New-SCClassInstance
New-SCSMClassInstance
 
New-SCSMObjectProjection    
New-SCSMRelationshipObject New-SCRelationshipInstance  
New-SCSMSession    
New-SCSMUserRole New-SCSMUserRole  
New-SCSMView    
Remove-SCGroup    
Remove-SCManagementPack Remove-SCManagementPack
Remove-SCSMManagementPack
 
Remove-SCQueue    
Remove-SCSMEnumeration    
Remove-SCSMObject Remove-SCClassInstance
Remove-SCSMClassInstance
 
Remove-SCSMRelationshipObject Remove-SCRelationshipInstance
Remove-SCSMRelationshipInstance
 
Remove-SCSMSession    
Remove-SCSMSubscription    
Remove-SCSMUserRole    
Remove-SCSMView    
Set-SCSMAnnouncement Update-SCSMAnnouncement  
Set-SCSMIncident    
Set-SCSMObject Update-SCClassInstance
Update-SCSMClassInstance
To update object you must get object with Get-SCSMClassInstance, set property when call Update-SCClassInstance
Set-SCSMObjectProjection   Call the Update() method of the Projection object
Set-SCSMObjectTemplate   Call the Update() method of the Object Template
Set-SCSMRunAsAccount   Call the Update() method of the Runas account

And list of new cmdlets for SCSM 2012 which not inclided in SMLets:

Add-SCSMAllowListClass
Get-SCDiscovery
Get-SCManagementGroupConnection
Get-SCSMAllowList
Get-SCSMChannel
Get-SCSMConnector
Get-SCSMDCMWorkflow
Get-SCSMDeletedItem
Get-SCSMDiscovery
Get-SCSMEmailTemplate
Get-SCSMEmailTemplateContent
Get-SCSMManagementGroupConnection
Get-SCSMPortalCMConfiguration
Get-SCSMPortalContactConfiguration
Get-SCSMPortalDeploymentProcess
Get-SCSMPortalSoftwarePackage
Get-SCSMSetting
Get-SCSMUser
Get-SCSMWorkflow
Get-SCSMWorkflowStatus
Import-SCSMInstance
New-SCADConnector
New-SCCMConnector
New-SCManagementGroupConnection
New-SCManagementPackBundle
New-SCOMAlertConnector
New-SCOMConfigurationItemConnector
New-SCOrchestratorConnector
New-SCRunAsAccount
New-SCSMADConnector
New-SCSMAlertRule
New-SCSMCMConnector
New-SCSMDCMWorkflow
New-SCSMEmailTemplate
New-SCSMManagementGroupConnection
New-SCSMManagementPackBundle
New-SCSMOMAlertConnector
New-SCSMOMConfigurationItemConnector
New-SCSMPortalDeploymentProcess
New-SCSMRunAsAccount
New-SCSMSubscription
New-SCSMWorkflow
New-SCVMMConnector
Remove-SCManagementGroupConnection
Remove-SCRunAsAccount
Remove-SCSMAllowListClass
Remove-SCSMAnnouncement
Remove-SCSMConnector
Remove-SCSMDCMWorkflow
Remove-SCSMEmailTemplate
Remove-SCSMManagementGroupConnection
Remove-SCSMPortalDeploymentProcess
Remove-SCSMRunAsAccount
Remove-SCSMSubscription
Remove-SCSMUserRole
Remove-SCSMWorkflow
Reset-SCSMAllowList
Restore-SCSMDeletedItem
Set-SCManagementGroupConnection
Set-SCSMChannel
Set-SCSMManagementGroupConnection
Set-SCSMPortalCMConfiguration
Set-SCSMPortalContactConfiguration
Start-SCSMConnector
Test-SCManagementPack
Test-SCSMManagementPack
Update-SCRunAsAccount
Update-SCSMConnector
Update-SCSMDCMWorkflow
Update-SCSMEmailTemplate
Update-SCSMPortalDeploymentProcess
Update-SCSMPortalSoftwarePackage
Update-SCSMRunAsAccount
Update-SCSMSetting
Update-SCSMSubscription
Update-SCSMUserRole
Update-SCSMWorkflow

Date warehouse cmdlets

To use DW cmdlets you must add module:

import-module 'C:\Program Files\Microsoft System Center\Service Manager 2012\Microsoft.EnterpriseManagement.Warehouse.Cmdlets.psd1'

List of DW cmdlets:

Disable-SCDWJob Disables a data warehouse job to prevent it from running.
Disable-SCDWJobCategory Disables all jobs within a job category.
Disable-SCDWJobSchedule The Disable-SCDWJobSchedule cmdlet disables a Data Warehouse job schedule, which causes the job schedule to stop initiating jobs. If the job schedule was previously enabled, disabling the job schedule retains the job schedule settings. To modify the job schedule settings, you need to run the Set-SCDWJobSchedule cmdlet.
Disable-SCDWSource Disables all jobs that are affiliated with the specified data source.
Enable-SCDWJob Enables a Data Warehouse job so that it can run according to its schedule.
Enable-SCDWJobCategory Enables all data warehouse jobs within the specified category.
Enable-SCDWJobSchedule The Enable-SCDWJobSchedule cmdlet allows Data Warehouse administrators to enable job schedules so that jobs run according to their specified schedule. To disable the job schedule, use the Disable-SCDWJobSchedule cmdlet.
Enable-SCDWSource Enables all jobs that are associated with the specified data source.
Get-SCDWEntity Gets the list of fact tables, dimensions, tables, and outriggers that exist in a data warehouse.
Get-SCDWJob Gets the list of all data warehouse jobs, displaying information such as the status of these jobs.
Get-SCDWJobModule Returns detailed status information about the modules of the specified job.
Get-SCDWJobSchedule The Get-SCDWJobSchedule cmdlet displays scheduling information for data warehouse jobs.
Get-SCDWRetentionPeriod Gets the data retention period in minutes for either a specific fact table within a specific data warehouse database or the default for fact tables within the database.
Get-SCDWSource Gets specific instances of data sources which are registered to the data warehouse.
Get-SCDWSourceType Gets the types of data sources that can be registered to the data warehouse.
Get-SCDWWatermark Gets the latest watermark for the specified job module.
New-SCDWSourceType Creates a new type of data source that can be registered to the data warehouse. Each data source type is defined by the classes and the relationships in the management pack bundle that is imported when you define the data source type.
Register-SCDWSource Registers instances of data source types, such as Service Manager, Operations Manager, and Configuration Manager, to the data warehouse.
Set-SCDWJobSchedule Sets the schedule for a data warehouse job.
Set-SCDWRetentionPeriod Sets the data retention period in minutes for either a specific fact table within a specific data warehouse database, or sets the default for fact tables within the database. Data that is eligible for grooming and older than the retention period will be groomed out of the database.
Set-SCDWSource Updates the definition of classes and relationships that can be populated for an instance of a data source.
Set-SCDWWatermark Sets the watermark from which subsequent data processing should continue.
Start-SCDWJob Starts a data warehouse job.
Stop-SCDWJob Stops a data warehouse job.
Unregister-SCDWManagementPack Removes a management pack directly from the data warehouse.
Unregister-SCDWSource Unregisters a data source from the data warehouse.

Share

%d bloggers like this: