Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ......

23
Provided by System Center Central | http://www.systemcentercentral.com Provided by System Center Central | http://www.systemcentercentral.com Service Manager 2010 Cmdlet Reference Contents Service Manager 2010 Cmdlet Reference .................................................................................................. 1 Add-SCDWMgmtGroup ........................................................................................................................... 2 Add-SCSMAllowListClass ......................................................................................................................... 2 Disable-SCDWJob .................................................................................................................................... 3 Disable-SCDWJobSchedule...................................................................................................................... 4 Enable-SCDWJob ..................................................................................................................................... 4 Enable-SCDWJobSchedule ...................................................................................................................... 5 Export-SCSMManagementPack .............................................................................................................. 5 Get-SCDWJob .......................................................................................................................................... 6 Get-SCDWJobModule .............................................................................................................................. 7 Get-SCDWJobSchedule............................................................................................................................ 9 Get-SCDWMgmtGroup .......................................................................................................................... 10 Get-SCSMAllowList ................................................................................................................................ 10 Get-SCSMConnector .............................................................................................................................. 11 Get-SCSMManagementPack ................................................................................................................. 12 Get-SCSMRunAsAccount ....................................................................................................................... 14 Import-SCSMInstance............................................................................................................................ 15 Import-SCSMManagementPack ............................................................................................................ 16 Remove-SCDWMgmtGroup .................................................................................................................. 17 Remove-SCSMAllowListClass ................................................................................................................ 18 Reset-SCSMAllowList............................................................................................................................. 19 Resume-SCDWJob ................................................................................................................................. 19 Set-SCDWJobSchedule .......................................................................................................................... 20 Set-SCSMConnector .............................................................................................................................. 21 Set-SCSMRunAsAccount ........................................................................................................................ 21 Start-SCDWJob ...................................................................................................................................... 22 Suspend-SCDWJob ................................................................................................................................ 23

Transcript of Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ......

Page 1: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

Service Manager 2010 Cmdlet Reference

Contents Service Manager 2010 Cmdlet Reference .................................................................................................. 1

Add-SCDWMgmtGroup ........................................................................................................................... 2

Add-SCSMAllowListClass ......................................................................................................................... 2

Disable-SCDWJob .................................................................................................................................... 3

Disable-SCDWJobSchedule...................................................................................................................... 4

Enable-SCDWJob ..................................................................................................................................... 4

Enable-SCDWJobSchedule ...................................................................................................................... 5

Export-SCSMManagementPack .............................................................................................................. 5

Get-SCDWJob .......................................................................................................................................... 6

Get-SCDWJobModule.............................................................................................................................. 7

Get-SCDWJobSchedule............................................................................................................................ 9

Get-SCDWMgmtGroup.......................................................................................................................... 10

Get-SCSMAllowList ................................................................................................................................ 10

Get-SCSMConnector.............................................................................................................................. 11

Get-SCSMManagementPack ................................................................................................................. 12

Get-SCSMRunAsAccount ....................................................................................................................... 14

Import-SCSMInstance............................................................................................................................ 15

Import-SCSMManagementPack ............................................................................................................ 16

Remove-SCDWMgmtGroup .................................................................................................................. 17

Remove-SCSMAllowListClass ................................................................................................................ 18

Reset-SCSMAllowList............................................................................................................................. 19

Resume-SCDWJob ................................................................................................................................. 19

Set-SCDWJobSchedule .......................................................................................................................... 20

Set-SCSMConnector .............................................................................................................................. 21

Set-SCSMRunAsAccount........................................................................................................................ 21

Start-SCDWJob ...................................................................................................................................... 22

Suspend-SCDWJob ................................................................................................................................ 23

Page 2: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

NAME

Add-SCDWMgmtGroup SYNOPSIS Registers a Service Manager management group and its servers as a source for the Data Warehouse. -------------------------- EXAMPLE 1 -------------------------- C:\PS>$cred = Get-Credential

Add-SCDWManagementGroup -SourceComputerName smmgmt1.companydomain.com -Credential $cred Description ----------- This command registers the Service Manager installation on the server smmgmt1.companydomain.com with the installed data warehouse management server. -------------------------- EXAMPLE 2 --------------------------

C:\PS>$cred = Get-Credential Add-SCDWManagementGroup -SourceComputerName SM1 -ComputerName DW1 Description ----------- This command registers the instance of Service Manager that is installed on the SM1 server with the Data Warehouse management server that is installed on the DW1 server. The Credential parameter is required, so the user will be prompted to enter credentials.

NAME

Add-SCSMAllowListClass SYNOPSIS Adds the specified classes to the allow list of classes to be used by the configuration item Operations Manager 200 7 connector during synchronization. -------------------------- EXAMPLE 1 --------------------------

Page 3: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

C:\PS>Get-SCSMAllowList name mp ---- --

System.Service System.Library System.Database System.Library Microsoft.Windows.ApplicationComponent Microsoft.Windows.Library Microsoft.Windows.ComputerRole Microsoft.Windows.Library System.Computer System.Library System.OperatingSystem System.Library Microsoft.Windows.LogicalDevice Microsoft.Windows.Library System.SoftwareInstallation System.Library System.WebSite System.Library System.SoftwareItem System.Software.Library

Description ----------- These commands add the System.SoftwareItem class to the Operations Manager 2007 connector allow list and then retrieve the allow list to verify that the class has been added. -------------------------- EXAMPLE 2 --------------------------

C:\PS>Add-SCSMAllowListClass -ClassName Config Description ----------- This command attempts to add a class that does not exist to the allow list.

NAME

Disable-SCDWJob SYNOPSIS Disables a data warehouse job to prevent it from running. -------------------------- EXAMPLE 1 --------------------------

Page 4: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

C:\PS>Disable-SCDWJob -JobName Extract_SM1 Description -----------

This command disables the Extract_SM1 job. NAME

Disable-SCDWJobSchedule SYNOPSIS 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.

-------------------------- EXAMPLE 1 -------------------------- C:\PS>Disable-SCDWJobSchedule -JobName Extract_SM1 Description ----------- This command disables the job schedule for the Extract_SM1 job.

NAME

Enable-SCDWJob SYNOPSIS Enables a Data Warehouse job so that it can run according to its schedule. -------------------------- EXAMPLE 1 -------------------------- C:\PS>Enable-SCDWJob -JobName Extract_SM1

Description -----------

Page 5: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

This command enables the Extract_SM1 job.

NAME

Enable-SCDWJobSchedule SYNOPSIS 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. -------------------------- EXAMPLE 1 -------------------------- C:\PS>Enable-SCDWJobSchedule -JobName Extract_SM1

Description ----------- This command enables the job schedule for the Extract_SM1 job. NAME

Export-SCSMManagementPack SYNOPSIS Exports a management pack to an .xml file.

-------------------------- EXAMPLE 1 -------------------------- C:\PS>Get-SCSMManagementPack ServiceManager.ConfigurationManagement.Library| Export-SCSMManagementPack -Directory C:\temp;ls C:\temp\*config* Directory: Microsoft.PowerShell.Core\FileSystem::C:\temp Mode LastWriteTime Length Name ---- ------------- ------ ---- -a--- 9/1/2009 12:23 AM 176578 ServiceManager.ConfigurationManagement.Library.xml

Page 6: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

Description ----------- This command exports all management packs whose Name or DisplayName property contains the "ServiceManager.ConfigurationManagement.Library" string. In this example, the first command in the pipeline uses the Get-SCSMManagementPack cmdlet to get the requested management packs. The pipeline operator then pipes

the output of the first command to the second command. NAME

Get-SCDWJob SYNOPSIS Gets the job status of all recurring jobs, including extract, transform, and load jobs. -------------------------- EXAMPLE 1 --------------------------

C:\PS>Get-SCDWJob BatchId Name Status CategoryName StartTime EndTime IsEnabled ------- ---- ------ ------------ --------- ------- --------- 75 Transform.Common Failed Transform 11/6/2009 1:05:00 PM 11/9/2009 10:36:00 AM True 1246 DWMaintenance Not Started Maintenance True 1248 Load.Common Not Started Load True 1261 MPSyncJob Not Started Synchronization True 1272 Extract_dwmg Running Extract 11/9/2009 10:59:00 AM True 1273 Extract_smg Running Extract 11/9/2009 10:59:00 AM True

Description ----------- This command retrieves the status of all jobs. -------------------------- EXAMPLE 2 -------------------------- C:\PS>Get-SCDWJob -JobName Extract_smg

BatchId Name Status CategoryName StartTime EndTime IsEnabled ------- ---- ------ ------------ --------- ------- --------- 1273 Extract_smg Running Extract 11/9/2009 10:59:00 AM True Description -----------

Page 7: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

This command retrieves the current status of the Extract_smg job.

-------------------------- EXAMPLE 3 -------------------------- C:\PS>Get-SCDWJob -JobBatchId 1273 BatchId Name Status CategoryName StartTime EndTime IsEnabled ------- ---- ------ ------------ --------- ------- --------- 1273 Extract_smg Completed Extract 11/9/2009 10:59:00 AM 11/9/2009 11:02:00 AM True Description -----------

This command retrieves the status of the job with batch ID 369. -------------------------- EXAMPLE 4 -------------------------- C:\PS>Get-SCDWJob -JobName Extract_smg -NumberOfBatches 2 BatchId Name Status CategoryName StartTime EndTime IsEnabled ------- ---- ------ ------------ --------- ------- ---------

1273 Extract_smg Completed Extract 11/9/2009 10:59:00 AM 11/9/2009 11:02:00 AM True 1275 Extract_smg Not Started Extract True Description ----------- This command retrieves the status of the last 2 runs of the Extract_smg job.

NAME

Get-SCDWJobModule SYNOPSIS Returns detailed information for the specified job. This information includes job modules that are executed as part of the job. -------------------------- EXAMPLE 1 --------------------------

Page 8: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

C:\PS>Get-SCDWJobModule -JobName MPSyncJob Job Name: MPSyncJob, Batch Id: 33

ModuleID Module Name Status Error Message -------- ----------- ------ ------------- 15 Delete Data Source Completed 16 MP Sync dwg : Associate Imported MP Vertex Waiting <Errors><Error>Waiting for Deploy... 17 MP Sync dwg : Disable All jobs Completed 18 MP Sync dwg : Disable Deployment jobs Completed <Errors><Error>Waiting for Acquir... 19 MP Sync dwg : Enable All jobs Not Started 20 MP Sync dwg : Synchronize ServiceManager MPs Completed

59 MP Sync smg : Associate Imported MP Vertex Not Started 60 MP Sync smg : Disable All jobs Not Started 61 MP Sync smg : Disable Deployment jobs Not Started 62 MP Sync smg : Enable All jobs Not Started 63 MP Sync smg : Synchronize ServiceManager MPs Not Started Description ----------- This command displays the status of job modules for the latest MPSyncJob job.

-------------------------- EXAMPLE 2 -------------------------- C:\PS>Get-SCDWJobModule -JobName MPSyncJob -ModuleName Synchronize ModuleID Module Name Status Error Message -------- ----------- ------ ------------- 20 MP Sync dwg : Synchronize ServiceManager MPs Completed 63 MP Sync smg : Synchronize ServiceManager MPs Not Started

Description ----------- This command displays the status of MPSyncJob job modules containing the name "Synchronize" (for the latest MPSyncJob batch).

Page 9: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

NAME

Get-SCDWJobSchedule SYNOPSIS The Get-SCDWJobSchedule cmdlet displays scheduling information for Data Warehouse jobs. You can use the JobName parameter to specify a job for which to display scheduling information. Otherwise, the Get-

SCDWJobSchedule cmdlet displays scheduling information for all Data Warehouse jobs. -------------------------- EXAMPLE 1 -------------------------- C:\PS>Get-SCDWJobSchedule -JobName Extract_smg Name Schedule Start Schedule Frequency Type Enabled ---- -------- ----- -------- --------- Extract_smg Daily 11/9/2009 12:00:00 AM True 00:05:00

Description ----------- This command retrieves scheduling information for the Extract_smg job. -------------------------- EXAMPLE 2 -------------------------- C:\PS>Get-SCDWJobSchedule

Name Schedule Start Schedule Frequency Type Enabled ---- -------- ----- -------- --------- Transform.Common Daily 11/9/2009 12:00:00 AM True 00:30:00 DWMaintenance True Extract_dwmg Daily 11/9/2009 12:00:00 AM True 00:05:00 Extract_smg Daily 11/9/2009 12:00:00 AM True 00:05:00 Load.Common Daily 11/9/2009 12:00:00 AM True 01:00:00 MPSyncJob Daily 11/9/2009 12:00:00 AM True 01:00:00

Description ----------- This command retrieves scheduling information for all jobs.

Page 10: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

NAME

Get-SCDWMgmtGroup SYNOPSIS Displays details about the management groups that are registered with the Data Warehouse.

-------------------------- EXAMPLE 1 -------------------------- C:\PS>Get-SCDWMgmtGroup -ComputerName DW1 DataSourceName DataSourceType DateRegistered DateUnregistered Version -------------- -------------- -------------- ---------------- ------- SM1 ServiceManager 1/1/0001 12:00:00 AM 1/1/0001 12:00:00 AM 1.0 Description

----------- This command returns all the Service Manager installations that are registered with the Data Warehouse installation on the DW1 computer. NAME

Get-SCSMAllowList SYNOPSIS Gets the allow list of classes that is used by the configuration item Operations Manager 2007 connector during synchronization

-------------------------- EXAMPLE 1 -------------------------- C:\PS>Get-SCSMAllowList name mp ---- -- System.Service System.Library System.Database System.Library Microsoft.Windows.ApplicationComponent Microsoft.Windows.Library Microsoft.Windows.ComputerRole Microsoft.Windows.Library

System.Computer System.Library System.OperatingSystem System.Library

Page 11: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

Microsoft.Windows.LogicalDevice Microsoft.Windows.Library System.SoftwareInstallation System.Library System.WebSite System.Library

Description ----------- This command retrieves the allow list on the local computer by using the credentials of the current user. NAME

Get-SCSMConnector SYNOPSIS Gets the connectors that are currently installed on the Service Manager server.

-------------------------- EXAMPLE 1 -------------------------- C:\PS>Get-SCSMConnector Enabled DisplayName DataProviderName ------- ----------- ---------------- False SCSM Connector SmsConnector True AD Connector ADConnector False AD Connector 2 ADConnector

Description ----------- This command returns the list of connectors, including their state and data providers. -------------------------- EXAMPLE 2 -------------------------- C:\PS>Get-SCSMConnector SCSM

Enabled DisplayName DataProviderName ------- ----------- ---------------- False SCSM Connector SmsConnector Description

Page 12: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

----------- This command returns the list of connectors whose Name or DisplayName property matches the "SCSM" string.

NAME

Get-SCSMManagementPack SYNOPSIS Gets installed management packs. -------------------------- EXAMPLE 1 -------------------------- C:\PS>Get-SCSMManagementPack Sealed Name DisplayName

------ ---- ----------- True Microsoft.SystemCenter.InstanceGroup.Library Instance Group Library True Microsoft.Windows.Peripheral.Library Windows Peripheral Library True ServiceManager.ActivityManagement.Library True System.Software.Library System Software Library True Microsoft.SystemCenter.Deployment.Library True ServiceManager.KnowledgeManagement.Library True Microsoft.EnterpriseManagement.ServiceManager.UI.Administration ServiceManager Administration ManagementPack False ServiceManager.LinkingFramework.Configuration True ServiceManager.LinkingFramework.Library

True System.Snmp.Library SNMP Library True ServiceManager.Core.Library Service Manager Core Library True Microsoft.EnterpriseManagement.ServiceManager.UI.Console Service Manager Console ManagementPack True System.ApplicationLog.Library Application Log Library True Microsoft.EnterpriseManagement.ServiceManager.UI.Authoring Service Manager Authoring ManagementPack True Microsoft.SystemCenter.Library System Center Core Library False Microsoft.EnterpriseManagement.ServiceManager.Default True Microsoft.SystemCenter.WorkItemGroup.Library Instance Group Library True System.Library System Library

True Microsoft.Windows.Library Windows Core Library True Microsoft.SystemCenter.ConfigurationManager Microsoft SystemCenter ConfigurationManager Library True Microsoft.EnterpriseManagement.ServiceManager.Connector.Sms False ServiceManager.ChangeManagement.Configuration ServiceManager ChangeManagement Configuration True System.Health.Library Health Library

Page 13: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

True Microsoft.SystemCenter.WorkflowFoundation.Library System Center Workflow Foundation Library True Microsoft.SystemCenter.Report.Library True ServiceManager.Datawarehouse.Library True Microsoft.EnterpriseManagement.ServiceManager.Connector.AD True ServiceManager.ConfigurationManagement.Library

False ServiceManager.ActivityManagement.Configuration True System.Notifications.Library System Notification Library True ServiceManager.IncidentManagement.Library Incident Management Library True Microsoft.SystemCenter.Subscriptions True ServiceManager.ChangeManagement.Library True System.Performance.Library Performance Library False ServiceManager.IncidentManagement.Configuration Incident Management Configuration Description -----------

This command retrieves all installed management packs. -------------------------- EXAMPLE 2 -------------------------- C:\PS>Get-SCSMManagementPack -name System.Library Sealed Name DisplayName ------ ---- -----------

True System.Library System Library Description ----------- This command retrieves the System.Library management pack. -------------------------- EXAMPLE 3 --------------------------

C:\PS>Get-SCSMManagementPack | ?{ $_.DeploymentStatus -ne "Success" } | Format-Table Name,DeploymentStatus Name DeploymentStatus ---- ----------- Microsoft.SystemCenter.InstanceGroup.Library In Process Microsoft.Windows.Peripheral.Library Failed

Page 14: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

Description ----------- This command shows the deployment status of management packs that did not deploy successfully.

-------------------------- EXAMPLE 4 -------------------------- C:\PS>Get-SCSMManagementPack|?{$_.DeploymentStatus -eq "Failed"}|%{ $_.DeployManagementPack() } Description ----------- This command attempts to redeploy the management packs that did not deploy successfully. The DeployManagementPack method on the object returned by Get-SCSMManagementPack does not return a value. To

retrieve the status of the deployment, run the Get-SCSMManagementPack cmdlet and check the DeploymentStatus property (as shown in example 3). NAME

Get-SCSMRunAsAccount SYNOPSIS Retrieves the RunAs accounts available in the Service Manager environment. -------------------------- EXAMPLE 1 --------------------------

C:\PS>Get-SCSMRunAsAccount PS> Get-SCSMRunAsAccount RunAsProfileName UserName ---------------- ---------- Domain Admin WOODGROVE\Administrator Automatic Agent Management Account Reserved Reserved

Privileged Monitoring Account Active Directory Based Agent Assignment Account Validate Alert Subscription Account Operational Database Account Microsoft.SystemCenter.PrimaryDeploymentAccount

Page 15: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

Description ----------- This command retrieves RunAs account information from the Service Manager environment.

-------------------------- EXAMPLE 2 -------------------------- C:\PS>Get-SCSMRunAsAccount -RunAsProfileName "Domain Admin" PS> Get-SCSMRunAsAccount RunAsProfileName UserName ---------------- ---------- Domain Admin WOODGROVE\Administrator

Description ----------- This command retrieves RunAs account information from the Service Manager environment for the "Domain Admin" RunAs account.

NAME

Import-SCSMInstance SYNOPSIS Imports objects and relationships from a comma-separated value (CSV) data file. -------------------------- EXAMPLE 1 -------------------------- C:\PS>Import-SCSMInstance -FormatFileName computers.xml -DataFileName computers.csv -BatchSize 100 Description -----------

This command imports the computer projections in computers.csv, 100 rows at a time. Contents of computers.xml ------------------------- <CSVImportFormat> <Projection Type="Microsoft.Windows.Computer.ProjectionType"> <Seed>

Page 16: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

<Class Type="Microsoft.Windows.Server.Computer"> <Property ID="IsVirtualNode"/> <Property ID="PrincipalName"/> </Class> </Seed>

<Component Alias="OperatingSystem"> <Seed> <Class Type="Microsoft.Windows.OperatingSystem"> <Property ID="OSVersion"/> <Property ID="ProductType"/> <Property ID="BuildNumber"/> </Class> </Seed> </Component> </Projection> </CSVImportFormat>

Contents of computers.csv ------------------------- false, computer1, 6.1, Windows, 1003 false, computer2, 6.1, Windows, 1003 ...

NAME

Import-SCSMManagementPack SYNOPSIS Specifies the credentials to use when you connect to the server on which the Service Manager SDK Service is running . The provided user account must have access to that server. The default value for this parameter is the user accou nt of the current context. -------------------------- EXAMPLE 1 -------------------------- C:\PS>Import-SCSMManagementPack -Fullname c:\temp\mymanagementpack.xml

Description ----------- This command imports the c:\temp\Mymanagementpack.xml management pack file into the Service Manager environment.

Page 17: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

-------------------------- EXAMPLE 2 -------------------------- C:\PS>Import-SCSMManagementPack -Fullname c:\temp\mymanagementpackbundle.mpb

Description ----------- This command imports the c:\temp\mymanagementpackbundle.mpb management pack bundle file into the Service Manager environment. -------------------------- EXAMPLE 3 --------------------------

C:\PS>Import-SCSMManagementPack c:\temp\mymanagementpackbundle.mpb -passthru IsSealed Name -------- ----- False Woodgrove.ManagementPack Description ----------- This example shows how to import the management packs from the management pack bundle file at

c:\temp\mymanagement packbundle.mpb and emit the imported management packs. NAME

Remove-SCDWMgmtGroup SYNOPSIS Unregisters a Service Manager management group and its associated servers as a Data Warehouse data source. -------------------------- EXAMPLE 1 --------------------------

C:\PS>Remove-SCDWManagementGroup -SourceComputerName SM1 -ComputerName DW1 Description -----------

Page 18: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

This command removes the SM1 Service Manager management server as a registered source from the Data Warehouse installed on DW1.

NAME

Remove-SCSMAllowListClass SYNOPSIS Removes the specified classes from the allow list of classes that are used by the configuration item Operations Manager 2007 connector during synchronization. -------------------------- EXAMPLE 1 -------------------------- C:\PS>Remove-SCSMAllowListClass "System.SoftwareItem";Get-SCSMAllowList

name mp ---- -- System.Service System.Library System.Database System.Library Microsoft.Windows.ApplicationComponent Microsoft.Windows.Library Microsoft.Windows.ComputerRole Microsoft.Windows.Library System.Computer System.Library System.OperatingSystem System.Library Microsoft.Windows.LogicalDevice Microsoft.Windows.Library System.SoftwareInstallation System.Library System.WebSite System.Library

Description ----------- These commands remove the System.SoftwareItem class from the allow list and then retrieve the allow list to verify that the class has been removed. -------------------------- EXAMPLE 2 --------------------------

C:\PS>Remove-SCSMAllowListClass "System.SoftwareItem" Remove-SCSMAllowListClass : Class System.SoftwareItem cannot be removed because it is not in the allow li st. At line:1 char:26 + Remove-SCSMAllowListClass <<<< "System.SoftwareItem"

Page 19: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

+ CategoryInfo : InvalidData: (System.SoftwareItem:String) [Remove-SCSMAllowListClass], Argument Exception + FullyQualifiedErrorId : Invalid allow list XML,Microsoft.EnterpriseManagement.SMCmdlets.RemoveSCSMAllowListClass

Description ----------- This command attempts to remove a class that is not present from the allow list. NAME

Reset-SCSMAllowList SYNOPSIS Resets the allow list of classes to be synchronized by the configuration item Operations Manager 2007 connector to

the default allow list. -------------------------- EXAMPLE 1 -------------------------- C:\PS>Reset-SCSMAllowList Description ----------- This command resets the allow list on the local server to the default allow list.

NAME

Resume-SCDWJob SYNOPSIS Resumes a suspended job. -------------------------- EXAMPLE 1 -------------------------- C:\PS>Resume-SCDWJob Extract_SM1

Description

Page 20: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

----------- This command resumes the Extract_SM1 job.

NAME

Set-SCDWJobSchedule SYNOPSIS Sets the schedule for a Data Warehouse job. -------------------------- EXAMPLE 1 --------------------------

C:\PS>Set-SCDWJobSchedule -JobName Extract_SM1 -ScheduleType Daily -DailyStart 06:00 -DailyFrequency 01:00 Description ----------- This command schedules the Extract_SM1 job to run daily, every hour, starting at 6 A.M. and recurring through the end of the day.

-------------------------- EXAMPLE 2 -------------------------- C:\PS>Set-SCDWJobSchedule -JobName Extract_SM1 -ScheduleType Weekly -WeeklyFrequency Tuesday, Thursday –WeeklyStart 06:00 Description ----------- This command schedules the Extract_SM1 job to run on Tuesdays and Thursdays at 6 A.M.

Page 21: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

NAME

Set-SCSMConnector SYNOPSIS Sets the enabled or disabled state on a connector. -------------------------- EXAMPLE 1 --------------------------

C:\PS>Get-SCSMConnector ^AD.* | Set-SCSMConnector -State Disabled Description ----------- This command sets the state of all connectors with a name that starts with "AD" to "Disabled".

-------------------------- EXAMPLE 2 -------------------------- C:\PS>Set-SCSMConnector AD -State Disabled Set-SCSMConnector : Cannot find Connector 'AD' because it does not exist. At line:1 char:14 + Set-SCSMConnector <<<< AD Description -----------

This command attempts to set connector state on a connector that cannot be found. NAME

Set-SCSMRunAsAccount SYNOPSIS Sets the credentials to be associated with a RunAs account. -------------------------- EXAMPLE 1 --------------------------

C:\PS>$Credential = Get-Credential

Page 22: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

Get-SCSMRunAsAccount -RunAsProfileName "Domain Admin" | Set-SCSMRunAsAccount -RunAsAccountCredential $Credential Description

----------- This command sets the RunAs account credentials for the "Domain Admin" account to the credentials tha t are specified by the Credential parameter. -------------------------- EXAMPLE 2 -------------------------- C:\PS>$credential = Get-Credential Get-SCSMRunAsAccount -RunAsProfileName "Domain Admin" | Set-SCSMRunAsAccount -RunAsAccountCredential

$credential -passthru RunAsProfileName UserName ---------------- ---------- Domain Admin WOODGROVE\Administrator Description ----------- This command sets the RunAs account credential to the supplied credential object and pipes the RunAs account

object as a result. NAME

Start-SCDWJob SYNOPSIS Starts a Data Warehouse job. -------------------------- EXAMPLE 1 --------------------------

C:\PS>Start-SCDWJob -JobName Extract_SM1 Description ----------- This command starts the Extract_SM1 job.

Page 23: Service Manager 2010 Cmdlet Reference Contents · Service Manager 2010 Cmdlet Reference ... SYNOPSIS Exports a management pack to an .xml ... Library Incident Management Library True

Provided by System Center Central | http://www.systemcentercentral.com

Provided by System Center Central | http://www.systemcentercentral.com

NAME

Suspend-SCDWJob SYNOPSIS The Suspend-SCDWJob cmdlet suspends operation of the specified job after all of its running job modules are complete. Any job modules that are queued to begin as part of the job will not run until the job is resumed. -------------------------- EXAMPLE 1 -------------------------- C:\PS>Suspend-SCDWJob -JobName Extract_SM1 Description

----------- This command suspends the Extract_SM1 job.