Download Get-SmaVariable - Center

Document related concepts
no text concepts found
Transcript
Cmdlet Reference for System Center 2012 R2
Service Management Automation
Microsoft Corporation
Published: November 1, 2013
Applies To
System Center 2012 R2 Service Management Automation
Feedback
Send suggestions and comments about this document to [email protected].
Copyright
This document is provided "as-is". Information and views expressed in this document, including URL
and other Internet website references, may change without notice.
Some examples depicted herein are provided for illustration only and are fictitious. No real association
or connection is intended or should be inferred.
This document does not provide you with any legal rights to any intellectual property in any Microsoft
product. You may copy and use this document for your internal, reference purposes. You may modify
this document for your internal, reference purposes.
© 2013 Microsoft Corporation. All rights reserved.
Microsoft, Active Directory, Bing, Excel, Hyper-V, Internet Explorer, Silverlight, SQL Server, Windows,
Windows Intune, Windows PowerShell, Windows Server, and Windows Vista are trademarks of the
Microsoft group of companies. All other trademarks are property of their respective owners.
Revision History
Release Date
Changes
November 1, 2013
Initial release of this document.
Contents
Edit-SmaRunbook ...................................................................................................................................... 5
Get-SmaAdminConfiguration ................................................................................................................... 10
Get-SmaCertificate .................................................................................................................................. 13
Get-SmaConnection ................................................................................................................................ 16
Get-SmaConnectionField ........................................................................................................................ 20
Get-SmaConnectionType ........................................................................................................................ 23
Get-SmaCredential .................................................................................................................................. 26
Get-SmaJob ............................................................................................................................................. 29
Get-SmaJobOutput .................................................................................................................................. 34
Get-SmaLicense ...................................................................................................................................... 38
Get-SmaModule ....................................................................................................................................... 41
Get-SmaRunbook .................................................................................................................................... 45
Get-SmaRunbookDefinition ..................................................................................................................... 49
Get-SmaRunbookWorkerDeployment ..................................................................................................... 53
Get-SmaSchedule ................................................................................................................................... 56
Get-SmaVariable ..................................................................................................................................... 59
Import-SmaModule .................................................................................................................................. 62
Import-SmaRunbook ................................................................................................................................ 66
New-SmaConnection ............................................................................................................................... 70
New-SmaRunbookWorkerDeployment .................................................................................................... 74
Publish-SmaRunbook .............................................................................................................................. 79
Remove-SmaCertificate........................................................................................................................... 83
Remove-SmaConnection......................................................................................................................... 87
Remove-SmaCredential .......................................................................................................................... 91
Remove-SmaModule ............................................................................................................................... 95
Remove-SmaRunbook ............................................................................................................................ 99
Remove-SmaSchedule .......................................................................................................................... 103
Remove-SmaVariable ............................................................................................................................ 107
Resume-SmaJob ................................................................................................................................... 111
Set-SmaAdminConfiguration ................................................................................................................. 115
Set-SmaCertificate ................................................................................................................................. 121
Set-SmaConnectionFieldValue ............................................................................................................. 126
Set-SmaCredential ................................................................................................................................ 131
Set-SmaLicense .................................................................................................................................... 136
Set-SmaRunbookConfiguration ............................................................................................................. 139
Set-SmaSchedule .................................................................................................................................. 144
Set-SmaVariable .................................................................................................................................... 150
Start-SmaRunbook ................................................................................................................................ 155
Stop-SmaJob ......................................................................................................................................... 160
Suspend-SmaJob .................................................................................................................................. 164
Edit-SmaRunbook
Edit-SmaRunbook
Updates the draft field of a runbook.
Syntax
Parameter Set: ByRunbookName
Edit-SmaRunbook -Path <String> -WebServiceEndpoint <String> [-AuthenticationType <String> ]
[-Credential <PSCredential> ] [-Name <String> ] [-Overwrite] [-Port <Int32> ] [-Confirm] [WhatIf] [ <CommonParameters>]
Parameter Set: ByRunbookId
Edit-SmaRunbook -Path <String> -WebServiceEndpoint <String> [-AuthenticationType <String> ]
[-Credential <PSCredential> ] [-Id <String> ] [-Overwrite] [-Port <Int32> ] [-Confirm] [WhatIf] [ <CommonParameters>]
Detailed Description
The Edit-SmaRunbook updates the draft field of a runbook. Provide a Windows PowerShell script
(.ps1) file that contains a runbook which becomes the draft runbook. If a draft already exists, use the
Overwrite parameter to force the cmdlet to overwrite the existing draft.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
Current User
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String>
Specifies the ID of a runbook.
Aliases
RunbookId
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a runbook.
Aliases
RunbookName
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Overwrite
Indicates that the new draft runbook overwrites the existing draft, if one exists.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Path<String>
Specifies a path to the new draft runbook.
Aliases
RunbookPath
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
9090
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Overwrite an existing draft runbook
This command overwrites the existing draft runbook.
PS C:\> Edit-SmaRunbook -Name "Runbk01" -WebServiceEndpoint https://contoso.com -Path
App01.ps1 -Overwrite
Related topics
Get-SmaRunbook
Start-SmaRunbook
Publish-SmaRunbook
Import-SmaRunbook
Remove-SmaRunbook
Get-SmaAdminConfiguration
Get-SmaAdminConfiguration
Gets the Service Management Automation administration configuration.
Syntax
Parameter Set: Default
Get-SmaAdminConfiguration -WebServiceEndpoint <String> [-AuthenticationType <String> ] [Credential <PSCredential> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The Get-SmaAdminConfiguration cmdlet gets the Service Management Automation administration
configuration. Specify the web service endpoint and, if necessary, a port.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get the administration configuration
This command gets the administration configuration for the Service Management Automation web
service that has the endpoint URL https://contoso.com/app01.
PS C:\> Get-SmaAdminConfiguration -WebServiceEndpoint "https://contoso.com/app01"
Related topics
Set-SmaAdminConfiguration
Get-SmaCertificate
Get-SmaCertificate
Gets a certificate from Service Management Automation.
Syntax
Parameter Set: Default
Get-SmaCertificate -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Name <String[]> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The Get-SmaCertificate cmdlet gets one or more Service Management Automation certificates.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String[]>
Specifies an array of certificate names.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get a certificate
This command gets the certificate named MyCertificate by using the web service endpoint and the
Name parameter.
PS C:\> Get-SmaCertificate -WebServiceEndpoint "https://contoso.com/app01" -Name
"MyCertificate"
Related topics
Remove-SmaCertificate
Set-SmaCertificate
Get-SmaConnection
Get-SmaConnection
Gets a Service Management Automation connection.
Syntax
Parameter Set: ByConnectionName
Get-SmaConnection -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Name <String[]> ] [-Port <Int32> ] [ <CommonParameters>]
Parameter Set: ByConnectionTypeName
Get-SmaConnection -ConnectionTypeName <String[]> -WebServiceEndpoint <String> [AuthenticationType <String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [
<CommonParameters>]
Detailed Description
The Get-SmaConnection cmdlet gets one or more Service Management Automation connections.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ConnectionTypeName<String[]>
Specifies an array of connection types.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String[]>
Specifies an array of connection names.
Aliases
ConnectionName
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get a connection
This command gets the connection named MyConnection.
PS C:\> Get-SmaConnection -WebServiceEndpoint "https://contoso.com/app01" -Name
"MyConnection"
Related topics
New-SmaConnection
Remove-SmaConnection
Get-SmaConnectionField
Get-SmaConnectionField
Gets a Service Management Automation connection field.
Syntax
Parameter Set: Default
Get-SmaConnectionField -ConnectionTypeName <String[]> -WebServiceEndpoint <String> [AuthenticationType <String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [
<CommonParameters>]
Detailed Description
The Get-SmaConnectionField cmdlet gets one or more Service Management Automation connection
fields.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ConnectionTypeName<String[]>
Specifies an array of connection types.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Retrieve a connection field
This command gets the connection fields of the connection type named MyConnectionType.
PS C:\> Get-SmaConnectionField -WebServiceEndpoint "https://contoso.com/app01" ConnectionTypeName "MyConnectionType"
Related topics
Set-SmaConnectionFieldValue
Get-SmaConnectionType
Get-SmaConnectionType
Gets all Service Management Automation connection types.
Syntax
Parameter Set: Default
Get-SmaConnectionType -WebServiceEndpoint <String> [-AuthenticationType <String> ] [Credential <PSCredential> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The Get-SmaConnectionType cmdlet gets all Service Management Automation connection types.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get connection types for a web service endopoint
This command gets the connection types for the specified web service endpoint.
PS C:\> Get-SmaConnectionType -WebServiceEndpoint "https://contoso.com/app01"
Related topics
New-SmaConnection
Get-SmaConnection
Get-SmaCredential
Get-SmaCredential
Gets Service Management Automation credentials.
Syntax
Parameter Set: Default
Get-SmaCredential -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Name <String[]> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The Get-SmaCredential cmdlet gets Service Management Automation credentials. The cmdlet returns
credentials as PSCredential objects.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String[]>
Specifies an array of PSCredential object names.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get credentials
This command gets credentials for the credential object named MyCredential.
PS C:\> Get-SmaCredential -WebServiceEndpoint "https://contoso.com/app01" -Name
"MyCredential"
Related topics
Remove-SmaCredential
Set-SmaCredential
Get-SmaJob
Get-SmaJob
Gets a runbook job.
Syntax
Parameter Set: GetAll
Get-SmaJob -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Port <Int32> ] [ <CommonParameters>]
Parameter Set: ByJobContextId
Get-SmaJob -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-ContextId
<String[]> ] [-Credential <PSCredential> ] [-Port <Int32> ] [ <CommonParameters>]
Parameter Set: ByJobId
Get-SmaJob -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Id <String[]> ] [-Port <Int32> ] [ <CommonParameters>]
Parameter Set: ByRunbookId
Get-SmaJob -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Port <Int32> ] [-RunbookId <String[]> ] [ <CommonParameters>]
Parameter Set: ByRunbookName
Get-SmaJob -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Port <Int32> ] [-RunbookName <String[]> ] [ <CommonParameters>]
Detailed Description
The Get-SmaJob cmdlet gets one or more runbook jobs in Service Management Automation. Specify
the web service endpoint and, if necessary, a port. By default, all jobs are returned. To get a specific
job, specify the JobId, JobContext, RunbookId, or RunbookName parameter.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ContextId<String[]>
Specifies an array of context IDs.
Aliases
JobContextId
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String[]>
Specifies an array of job IDs.
Aliases
JobId
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-RunbookId<String[]>
Specifies an array of IDs, as strings, of a runbook.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-RunbookName<String[]>
Specifies an array of runbook names.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get a runbook job
This command gets the job with the specified GUID.
PS C:\> Get-SmaJob -WebServiceEndpoint "https://localhost" -JobId "2989b069-24fe-40b9-b3bdcb7e5eac4b647"
Related topics
Resume-SmaJob
Stop-SmaJob
Suspend-SmaJob
Get-SmaJobOutput
Get-SmaJobOutput
Gets the output of a Service Management Automation job.
Syntax
Parameter Set: Default
Get-SmaJobOutput -Id <String> -Stream <String> -WebServiceEndpoint <String> [AuthenticationType <String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [-StartTime
<DateTime> ] [ <CommonParameters>]
Detailed Description
The Get-SmaJobOutput cmdlet gets the output of a Service Management Automation job. Specify a
Service Management Automation job ID and the web service endpoint.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String>
Specifies the ID, as a string, of a job.
Aliases
JobId
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-StartTime<DateTime>
Specifies a start time as a DateTime object. The cmdlet retrieves output created after this time. To get a
DateTime object, use the Get-Date cmdlet.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Stream<String>
Specifies the type of output. Valid values are:
-- Any
-- Debug
-- Error
-- Output
-- Progress
-- Verbose
-- Warning
NOTE: Stream values are case-sensitive. If the wrong case is used, the error 'job id "<GUID>" not
found' is returned.
Aliases
OutputType
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get the output of a Service Management Automation job
This command gets all of the output of the job with the specified GUID for the specified web service
endpoint.
PS C:\> Get-SmaJobOutput -Id "2989b069-24fe-40b9-b3bd-cb7e5eac4b64" -WebServiceEndpoint
"https://contoso.com/app01"
Related topics
Get-SmaJob
Get-SmaLicense
Get-SmaLicense
Gets Service Management Automation licensing information.
Syntax
Parameter Set: Default
Get-SmaLicense -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The Get-SmaLicense cmdlet gets Service Management Automation licensing information.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get Service Management Automation licensing
information
This command gets Service Management Automation licensing information for Service Management
Automation service.
PS C:\> Get-SmaLicense -WebServiceEnddpoint "https://localhost"
Related topics
Set-SmaLicense
Get-SmaModule
Get-SmaModule
Gets a module from Service Management Automation.
Syntax
Parameter Set: GetAll
Get-SmaModule -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Port <Int32> ] [ <CommonParameters>]
Parameter Set: ByModuleId
Get-SmaModule -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Id <String[]> ] [-Port <Int32> ] [ <CommonParameters>]
Parameter Set: ByModuleName
Get-SmaModule -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Name <String[]> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The Get-SmaModule cmdlet gets one or more modules from Service Management Automation.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String[]>
Specifies an array of module IDs.
Aliases
ModuleId
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Name<String[]>
Specifies an array of module names.
Aliases
ModuleName
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get a module
This command retrieves the module with the specified GUID.
PS C:\> Get-SmaModule -WebServiceEndpoint "https://contoso.com/app01" -Id "a65bba12-792b44e8-8a50-1c3e40c34031"
Related topics
Import-SmaModule
Remove-SmaModule
Get-SmaRunbook
Get-SmaRunbook
Gets a Service Management Automation runbook.
Syntax
Parameter Set: GetAll
Get-SmaRunbook -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Port <Int32> ] [ <CommonParameters>]
Parameter Set: ByRunbookId
Get-SmaRunbook -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Id <String[]> ] [-Port <Int32> ] [ <CommonParameters>]
Parameter Set: ByRunbookName
Get-SmaRunbook -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Name <String[]> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The Get-SmaRunbook cmdlet gets one or more Service Management Automation runbooks. By
default, all runbooks are returned. To get a specific runbook, specify its name or ID.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
Current User
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String[]>
Specifies an array of runbook IDs.
Aliases
RunbookId
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Name<String[]>
Specifies an array of runbook names.
Aliases
RunbookName
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
9090
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get a runbook by its name
This command gets the runbook named Runbk01 from the Service Management Automation web
service that has endpoint URL https://contoso.com/app01.
PS C:\> Get-SmaRunbook -Name "Runbk01" -WebServiceEndpoint "https://contoso.com/app01"
Related topics
Edit-SmaRunbook
Start-SmaRunbook
Publish-SmaRunbook
Import-SmaRunbook
Remove-SmaRunbook
Get-SmaRunbookDefinition
Get-SmaRunbookDefinition
Gets a runbook definition.
Syntax
Parameter Set: All
Get-SmaRunbookDefinition -Type <RunbookVersionType> -WebServiceEndpoint <String> [AuthenticationType <String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [
<CommonParameters>]
Parameter Set: ByRunbookId
Get-SmaRunbookDefinition -Id <String[]> -Type <RunbookVersionType> -WebServiceEndpoint
<String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [
<CommonParameters>]
Parameter Set: ByRunbookName
Get-SmaRunbookDefinition [-Name] <String[]> -Type <RunbookVersionType> -WebServiceEndpoint
<String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [
<CommonParameters>]
Parameter Set: ByVersionId
Get-SmaRunbookDefinition -VersionId <String[]> -WebServiceEndpoint <String> [AuthenticationType <String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [
<CommonParameters>]
Detailed Description
The Get-SmaRunbookDefinition cmdlet gets one or more runbooks. By default, all runbook definitions
of the specifies version type are returned. To get a specific runbook, specify its name or ID.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String[]>
Specifies an array of runbook IDs.
Aliases
RunbookId
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Name<String[]>
Specifies an array of runbook names.
Aliases
RunbookName
Required?
true
Position?
1
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Type<RunbookVersionType>
Specifies a runbook version type. Valid values are: Published, Draft.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-VersionId<String[]>
Specifies an array of runbook version IDs.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get a runbook definition by Name
This command gets the draft runbook definition of the runbook with the name RunbookDef01.
PS C:\> Get-SmaRunbookDefinition -WebServiceEndpoint "https://localhost" -Name
"RunbookDef01" -Type "Draft"
Related topics
Get-SmaRunbook
Get-SmaRunbookWorkerDeployment
Get-SmaRunbookWorkerDeployment
Gets all runbook workers in the Service Management Automation deployment.
Syntax
Parameter Set: Default
Get-SmaRunbookWorkerDeployment -WebServiceEndpoint <String> [-AuthenticationType <String> ]
[-Credential <PSCredential> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The Get-SmaRunbookWorkerDeployment cmdlet gets all runbook workers in the Service
Management Automation deployment. Specify the web service endpoint and, if necessary, a port.
Runbook workers in the Service Management Automation deployment are workers configured to pick
up and process runbook jobs.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get runbook workers in the Service Management
Automation deployment
This command gets all runbook workers from the Service Management Automation web service that
has the endpoint URL https://contoso.com/app01.
PS C:\> Get-SmaRunbookWorkerDeployment -WebServiceEndpoint "https://contoso.com/app01"
Related topics
New-SmaRunbookWorkerDeployment
about_SMA_Runbook_Worker_Deployment
Get-SmaSchedule
Get-SmaSchedule
Gets a Service Management Automation schedule.
Syntax
Parameter Set: Default
Get-SmaSchedule -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Name <String[]> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The Get-SmaSchedule cmdlet gets one or more Service Management Automation schedules. Specify
the web service endpoint and, if necessary, a port number. By default, all schedules are returned. To
get a specific schedule, specify its name.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String[]>
Specifies an array of schedule names.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get a schedule
This command gets the Service Management Automation schedule named DailySchedule08 from the
specified web service endpoint.
PS C:\> Get-SmaSchedule -WebServiceEndpoint "https://contoso.com/app01" -Name
"DailySchedule08"
Related topics
Remove-SmaSchedule
Set-SmaSchedule
Get-SmaVariable
Get-SmaVariable
Gets a Service Management Automation variable.
Syntax
Parameter Set: Default
Get-SmaVariable -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Name <String[]> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The Get-SmaVariable cmdlet gets one or more Service Management Automation variables. Specify
the web service endpoint and, if necessary, a port number. By default, all variables are returned. To get
a specific variable, specify its name.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String[]>
Specifies the name of a variable.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Get a variable
This command gets the variable named Variable83 from the specified web service endpoint.
PS C:\> Get-SmaVariable -WebServiceEndpoint "https://contoso.com/app01" -Name "Variable83"
Related topics
Remove-SmaVariable
Set-SmaVariable
Import-SmaModule
Import-SmaModule
Imports a module into Service Management Automation.
Syntax
Parameter Set: Default
Import-SmaModule -Path <String> -WebServiceEndpoint <String> [-AuthenticationType <String> ]
[-Credential <PSCredential> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Import-SmaModule cmdlet imports a module into Service Management Automation. A module is a
compressed file, with a .zip extension, that contains a folder which includes one of the following file
types:
-- A Windows PowerShell module (psm1 file).
-- A Windows PowerShell module manifest (psd1 file).
-- An assembly (dll file)
The names of the zip file, the folder in the zip file, and file in the folder (.psm1, psd.1, or .dll) must
match.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Path<String>
Specifies the path to a module. The path must point to a compressed file, with a .zip extension, that
contains a folder which includes one of the following file types:
-- A Windows PowerShell module (psm1 file).
-- A Windows PowerShell module manifest (psd1 file).
-- An assembly (dll file).
The names of the zip file, the folder in the zip file, and the file in the folder (.psm1, psd.1, or .dll) must
match.
Aliases
ModulePath
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Import a module
This command imports the module named MyModule from the specified module path.
PS C:\> Import-SmaModule -WebServiceEndpoint "https://contoso.com/app01" -Path
".\MyModule.zip"
Related topics
Get-SmaModule
Remove-SmaModule
Import-SmaRunbook
Import-SmaRunbook
Imports a runbook into Service Management Automation.
Syntax
Parameter Set: Default
Import-SmaRunbook -Path <String> -WebServiceEndpoint <String> [-AuthenticationType <String>
] [-Credential <PSCredential> ] [-Port <Int32> ] [-Tags <String> ] [-Confirm] [-WhatIf] [
<CommonParameters>]
Detailed Description
The Import-SmaRunbook cmdlet imports a runbook into Service Management Automation. The
runbook must be a Windows PowerShell script (.ps1) file. Specify the path of a runbook and the web
service endpoint. If necessary, specify the port of the Service Management Automation web service.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Path<String>
Specifies the path to a runbook.
Aliases
RunbookPath
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Tags<String>
Specifies one or more runbook tags. Provide all tags within one string, separated by commas.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Import a runbook into Service Management Automation
This command imports the runbook file named Runbook01.ps1 into the Service Management
Automation web service that has endpoint URL https://contoso.com/app01.
PS C:\> Import-SmaRunbook -Path "./Runbook01.ps1" -WebServiceEndpoint
"https://contoso.com/app01"
Related topics
Edit-SmaRunbook
Get-SmaRunbook
Start-SmaRunbook
Publish-SmaRunbook
Remove-SmaRunbook
New-SmaConnection
New-SmaConnection
Creates a connection instance in Service Management Automation.
Syntax
Parameter Set: Default
New-SmaConnection -ConnectionTypeName <String> -Name <String> -WebServiceEndpoint <String>
[-AuthenticationType <String> ] [-ConnectionFieldValues <Hashtable> ] [-Credential
<PSCredential> ] [-Description <String> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The New-SmaConnection cmdlet creates a connection instance in Service Management Automation.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ConnectionFieldValues<Hashtable>
Specifies a hash table that contains key/value pairs. The keys represent the connection fields on the
specified connection type. The values represent the specific values to store for each connection field for
the connection instance.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ConnectionTypeName<String>
Specifies a connection type.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Description<String>
Specifies a description for the connection.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String>
Specifies a name for the connection.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Create a connection
This command creates a connection named MyConnection by using the Name, ConnectionTypeName,
and ConnectionFieldValues parameters.
PS C:\> New-SmaConnection -WebServiceEndpoint "https://contoso.com/app01" -Name
"MyConnection" -ConnectionTypeName "MyConnectionType" -Description "This is a new
connection" -ConnectionFieldValues @{ "Hostname"="Computer01"; "Username"="SarahJones";
Password="passw0rd!"}
Related topics
Get-SmaConnection
Remove-SmaConnection
New-SmaRunbookWorkerDeployment
New-SmaRunbookWorkerDeployment
Changes the runbook worker deployment in Service Management Automation.
Syntax
Parameter Set: ByComputerName
New-SmaRunbookWorkerDeployment [-ComputerName] <String[]> -WebServiceEndpoint <String> [AuthenticationType <String> ] [-Credential <PSCredential> ] [-Force] [-Port <Int32> ] [Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ByRunbookWorkers
New-SmaRunbookWorkerDeployment -RunbookWorkers <SmaRunbookWorkerDeploymentInfo[]> WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [Force] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The New-SmaRunbookWorkerDeployment cmdlet changes the runbook worker deployment in
Service Management Automation. Runbook workers are processes configured to pick up and process
runbook jobs.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ComputerName<String[]>
Specifies an array of names for computers that host runbooks. You can use NetBIOS names, IP
addresses, or fully qualified domain names (FQDNs). If you do not specify this parameter, the cmdlet
uses the local computer.
Aliases
none
Required?
true
Position?
2
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Force
Creates the runbook worker deployment without prompting you for confirmation. By default, the cmdlet
prompts you for confirmation before it proceeds.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-RunbookWorkers<SmaRunbookWorkerDeploymentInfo[]>
Specifies the runbook workers to include in the new deployment.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Create runbook workers
This command creates a runbook worker deployment that contains the computers named
RWcomputer01 and RWComputer02 for the specified web service endpoint.
PS C:\> New-SmaRunbookWorkerDeployment -WebServiceEndpoint "https://contoso.com/app01" ComputerName "RWcomputer01", "RWComputer02"
Related topics
Get-SmaRunbookWorkerDeployment
about_SMA_Runbook_Worker_Deployment
Publish-SmaRunbook
Publish-SmaRunbook
Publishes a runbook in Service Management Automation.
Syntax
Parameter Set: ByRunbookName
Publish-SmaRunbook -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Name <String> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [
<CommonParameters>]
Parameter Set: ByRunbookId
Publish-SmaRunbook -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Id <String> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Publish-SmaRunbook cmdlet publishes a runbook into the production environment of Service
Management Automation. Specify the ID or name of a runbook and the web service endpoint.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String>
Specifies the ID of a runbook.
Aliases
RunbookId
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a runbook.
Aliases
RunbookName
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Publish a runbook
This command publishes the runbook named Runbk01.
PS C:\> Publish-SmaRunbook -Name "Runbk01" -WebServiceEndpoint "https://contoso.com/app01"
Related topics
Edit-SmaRunbook
Get-SmaRunbook
Start-SmaRunbook
Import-SmaRunbook
Remove-SmaRunbook
Remove-SmaCertificate
Remove-SmaCertificate
Deletes a certificate from Service Management Automation.
Syntax
Parameter Set: Default
Remove-SmaCertificate -Name <String> -WebServiceEndpoint <String> [-AuthenticationType
<String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [
<CommonParameters>]
Detailed Description
The Remove-SmaCertificate cmdlet deletes a certificate from Service Management Automation.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a certificate.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Remove a certificate
This command removes the certificate named MyCertificate.
PS C:\> Remove-SmaCertificate -WebServiceEndpoint "https://localhost" -Name "MyCertificate"
Related topics
Get-SmaCertificate
Set-SmaCertificate
Remove-SmaConnection
Remove-SmaConnection
Deletes a connection from Service Management Automation.
Syntax
Parameter Set: Default
Remove-SmaConnection -Name <String> -WebServiceEndpoint <String> [-AuthenticationType
<String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [
<CommonParameters>]
Detailed Description
The Remove-SmaConnection cmdlet deletes a connection from Service Management Automation.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a connection.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Remove a connection
This command removes the connection named MyConnection.
PS C:\> Remove-SmaConnection -WebServiceEndpoint "https://localhost" -Name "MyConnection"
Related topics
Get-SmaConnection
New-SmaConnection
Remove-SmaCredential
Remove-SmaCredential
Deletes a credential from Service Management Automation.
Syntax
Parameter Set: Default
Remove-SmaCredential -Name <String> -WebServiceEndpoint <String> [-AuthenticationType
<String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [
<CommonParameters>]
Detailed Description
The Remove-SmaCredential cmdlet deletes a credential from Service Management Automation.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a credential.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Delete credentials
This command removes the credentials named MyCredential.
PS C:\> Remove-SmaCredential -WebServiceEndpoint "https://localhost" -Name "MyCredential"
Related topics
Get-SmaCredential
Set-SmaCredential
Remove-SmaModule
Remove-SmaModule
Deletes a module from Service Management Automation.
Syntax
Parameter Set: ByModuleName
Remove-SmaModule -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Name <String> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [
<CommonParameters>]
Parameter Set: ByModuleId
Remove-SmaModule -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Id <String> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Remove-SmaModule cmdlet deletes a module from Service Management Automation.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String>
Specifies the identifier for a module.
Aliases
ModuleId
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a module.
Aliases
ModuleName
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Remove a module
This command removes the module named Module01.
PS C:\> Remove-SmaModule -Name "Module01" -WebServiceEndpoint "https://localhost"
Related topics
Get-SmaModule
Import-SmaModule
Remove-SmaRunbook
Remove-SmaRunbook
Removes a runbook from Service Management Automation.
Syntax
Parameter Set: ByRunbookName
Remove-SmaRunbook -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Name <String> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [
<CommonParameters>]
Parameter Set: ByRunbookId
Remove-SmaRunbook -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Id <String> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Remove-SmaRunbook cmdlet removes a runbook from Service Management Automation.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String>
Specifies the ID of a runbook.
Aliases
RunbookId
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a runbook.
Aliases
RunbookName
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Remove a runbook
This command removes the runbook named MyRunbook.
PS C:\> Remove-SmaRunbook -WebServiceEndpoint https://localhost -Name "MyRunbook"
Related topics
Edit-SmaRunbook
Get-SmaRunbook
Start-SmaRunbook
Publish-SmaRunbook
Import-SmaRunbook
Remove-SmaSchedule
Remove-SmaSchedule
Deletes a schedule from Service Management Automation.
Syntax
Parameter Set: Default
Remove-SmaSchedule -Name <String> -WebServiceEndpoint <String> [-AuthenticationType <String>
] [-Credential <PSCredential> ] [-Force] [-Port <Int32> ] [-Confirm] [-WhatIf] [
<CommonParameters>]
Detailed Description
The Remove-SmaSchedule cmdlet deletes a schedule from Service Management Automation. Specify
the name of a schedule, the web service endpoint, and, if necessary, a port number.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Force
Removes the schedule without prompting you for confirmation. By default, the cmdlet prompts you for
confirmation before it proceeds.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a schedule.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Remove a schedule
This command removes the schedule named MySchedule.
PS C:\> Remove-SmaSchedule -WebServiceEndpoint https://localhost -Name "MySchedule"
Related topics
Get-SmaSchedule
Set-SmaSchedule
Remove-SmaVariable
Remove-SmaVariable
Deletes a variable from Service Management Automation.
Syntax
Parameter Set: Default
Remove-SmaVariable -Name <String> -WebServiceEndpoint <String> [-AuthenticationType <String>
] [-Credential <PSCredential> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Remove-SmaVariable cmdlet deletes a variable from Service Management Automation. Specify
the name of the variable, the web service endpoint, and, if necessary, a port number.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a variable.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Remove a variable
This command removes the variable named MyVariable.
PS C:\> Remove-SmaVariable -WebServiceEndpoint https://localhost -Name "MyVariable"
Related topics
Get-SmaVariable
Set-SmaVariable
Resume-SmaJob
Resume-SmaJob
Resumes a Service Management Automation job.
Syntax
Parameter Set: Default
Resume-SmaJob -Id <String> -WebServiceEndpoint <String> [-AuthenticationType <String> ] [Credential <PSCredential> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Resume-SmaJob cmdlet resumes a suspended Service Management Automation job. Specify the
suspended job and the web service endpoint.
To suspend a job, use the Suspend-SmaJob cmdlet.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String>
Specifies a job ID.
Aliases
JobId
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation Web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Resume a suspended Service Management Automation
job
The first command gets the job object with the specified GUID and stores the object in the $Job
variable.
The second command resumes the job.
PS C:\> $Job = Get-SmaJob -WebServiceEndpoint "https://localhost" -JobId "2989b069-24fe40b9-b3bd-cb7e5eac4b64"
PS C:\> Resume-SmaJob -WebServiceEndpoint "https://localhost" -JobId $Job.JobId
Related topics
Get-SmaJob
Stop-SmaJob
Suspend-SmaJob
Set-SmaAdminConfiguration
Set-SmaAdminConfiguration
Modifies administrative configuration settings in Service Management Automation.
Syntax
Parameter Set: Default
Set-SmaAdminConfiguration -WebServiceEndpoint <String> [-AuthenticationType <String> ] [CEIP <Boolean> ] [-ChartTimeSliceSampleSize <ChartTimeSliceSampleSize> ] [-Credential
<PSCredential> ] [-DrainTimeInSeconds <Int32> ] [-Force] [-MaxJobRecords <Int32> ] [-Port
<Int32> ] [-PurgeJobsOlderThanCountDays <Int32> ] [-ScriptExecutionPolicy <String> ] [Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-SmaAdminConfiguration cmdlet modifies administration configuration settings in Service
Management Automation. Specify the web service endpoint and, if necessary, a port.
Use this cmdlet to configure the following settings :
-- Participation in the Customer Experience Improvement Program (CEIP)
-- Drain time
-- Script execution policy
-- Chart time slice sample size
-- The maximum job records to store before purging the oldest jobs
-- The maximum age of a job before it is purged
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-CEIP<Boolean>
Indicates whether CEIP is enabled.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ChartTimeSliceSampleSize<ChartTimeSliceSampleSize>
Specifies the chart time slice sample size. Valid values are:
-- Small
-- Medium
-- Large
-- ExtraLarge
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-DrainTimeInSeconds<Int32>
Specifies the time, in seconds, after which the runbook worker hosts terminate running jobs after a
runbook worker service stop has been initiated. While the host is draining, existing jobs are given the
specified drain time seconds to suspend or terminate naturally, and no new jobs are accepted.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Force
Modifies the configuration without prompting you for confirmation. By default, the cmdlet prompts you
for confirmation before it proceeds.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-MaxJobRecords<Int32>
Specifies the maximum number of job records that are retained.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-PurgeJobsOlderThanCountDays<Int32>
Specifies the number of days job history is kept. Jobs older than this number of days are purged.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ScriptExecutionPolicy<String>
Determines the Windows PowerShell execution policy for runbook jobs on the worker hosts. For
information about execution policies, type Get-Help about_Execution_Policies. Valid values for this
parameter are:
-- Restricted. You cannot run scripts. You can use Windows PowerShell only in interactive mode.
-- AllSigned. You can run only scripts signed by a trusted publisher.
-- RemoteSigned. Downloaded scripts must be signed by a trusted publisher before you can run the
scripts.
-- Unrestricted. No restrictions; you can run all Windows PowerShell scripts.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Modify an administrative configuration setting
This command sets the drain time to 60 seconds.
PS C:\> Set-SmaAdminConfiguration -WebServiceEndpoint "https://contoso.com/app01" DrainTimeInSeconds 60
Related topics
Get-SmaAdminConfiguration
Set-SmaCertificate
Set-SmaCertificate
Creates or updates a certificate in Service Management Automation.
Syntax
Parameter Set: Default
Set-SmaCertificate -Name <String> -Password <SecureString> -Path <String> WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [Description <String> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-SmaCertificate cmdlet creates or updates a certificate in Service Management Automation.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Description<String>
Provides a description for the certificate.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a certificate.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Password<SecureString>
Specifies the password, as a secure string, to access the certificate.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Path<String>
Specifies the local path to a certificate.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Create a certificate
The first command creates a secure string for the provided password and stores the secure string in the
$Password variable.
The second command creates a certificate named MyCertificate. The command provides the path to
the certificate file, as well as the password stored in $Password.
PS C:\> $Password = ConvertTo-SecureString "PassWord!" -AsPlainText -Force
PS C:\> Set-SmaCertificate -WebServiceEndpoint "https://contoso.com/app01" -Name
"MyCertificate" -Path "./cert.pfx" -Password $Password
Related topics
Get-SmaCertificate
Remove-SmaCertificate
Set-SmaConnectionFieldValue
Set-SmaConnectionFieldValue
Modifies a connection field value for a connection object in Service Management Automation.
Syntax
Parameter Set: Default
Set-SmaConnectionFieldValue -ConnectionFieldName <String> -ConnectionName <String> -Value
<Object> -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Force] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-SmaConnectionFieldValue cmdlet modifies a connection field value for a connection object in
Service Management Automation.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ConnectionFieldName<String>
Specifies the name of a connection field.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ConnectionName<String>
Specifies the name of a connection.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Force
Modifies the connection field value without prompting you for confirmation. The cmdlet prompts you for
confirmation before it proceeds if you attempt to pass a SecureString as the value for the Value
parameter.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Value<Object>
Specifies a value for the connection field.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Modify a connection field value
The first command converts the string provided into a secure string, and then stores the SecureString
object in the $Password variable.
The second command modifies the connection field value named Password.
PS C:\> $Password = ConvertTo-SecureString -String "PassWord01!" -Force
PS C:\> Set-SmaConnectionFieldValue -WebServiceEndpoint "https://contoso.com/app01" ConnectionName "MyConnection" -ConnectionFieldName "Password" -Value $Password
Set-SmaCredential
Set-SmaCredential
Creates or updates a credential in Service Management Automation.
Syntax
Parameter Set: Default
Set-SmaCredential -Name <String> -Value <PSCredential> -WebServiceEndpoint <String> [AuthenticationType <String> ] [-Credential <PSCredential> ] [-Description <String> ] [-Port
<Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-SmaCredential cmdlet creates or updates a credential, as a PSCredential object, in Service
Management Automation.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Description<String>
Provides a description for the credential object.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a credential object.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Value<PSCredential>
Specifies a PSCredential object.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Create a credential
The first command uses the Get-Credential cmdlet to create a credential object and then stores the
object in the $Creds variable.
The second command uses the credentials stored in $Creds to create a credential named
MyCredential.
PS C:\> $Creds = Get-Credential
PS C:\> Set-SmaCredential -WebServiceEndpoint "https://contoso.com/app01" -Name
"MyCredential" -Value $Creds
Related topics
Get-SmaCredential
Remove-SmaCredential
Set-SmaLicense
Set-SmaLicense
Updates the Service Management Automation product key.
Syntax
Parameter Set: Default
Set-SmaLicense [-ProductKey] <String> -WebServiceEndpoint <String> [-AuthenticationType
<String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The Set-SmaLicense cmdlet updates the Service Management Automation product key. If you are
using an evaluation version of Service Management Automation, use this cmdlet to provide a product
key to upgrade to the full product version.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windowsw
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ProductKey<String>
Specifies the Service Management Automation product key.
Aliases
none
Required?
true
Position?
1
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Provide a Service Management Automation product key
This command provides a product key to Service Management Automation.
PS C:\> Set-SmaLicense -WebServiceEndopoint "https://localhost" -ProductKey "XXXX-XXXXXXXXXX-XXXXX"
Related topics
Get-SmaLicense
Set-SmaRunbookConfiguration
Set-SmaRunbookConfiguration
Modifies the configuration of a runbook.
Syntax
Parameter Set: All
Set-SmaRunbookConfiguration -WebServiceEndpoint <String> [-AuthenticationType <String> ] [Credential <PSCredential> ] [-Description <String> ] [-LogDebug <Boolean> ] [-LogProgress
<Boolean> ] [-LogVerbose <Boolean> ] [-Port <Int32> ] [ <CommonParameters>]
Parameter Set: ByRunbookId
Set-SmaRunbookConfiguration -Id <String> -WebServiceEndpoint <String> [-AuthenticationType
<String> ] [-Credential <PSCredential> ] [-Description <String> ] [-LogDebug <Boolean> ] [LogProgress <Boolean> ] [-LogVerbose <Boolean> ] [-Port <Int32> ] [ <CommonParameters>]
Parameter Set: ByRunbookName
Set-SmaRunbookConfiguration -Name <String> -WebServiceEndpoint <String> [-AuthenticationType
<String> ] [-Credential <PSCredential> ] [-Description <String> ] [-LogDebug <Boolean> ] [LogProgress <Boolean> ] [-LogVerbose <Boolean> ] [-Port <Int32> ] [ <CommonParameters>]
Detailed Description
The Set-SmaRunbookConfiguration cmdlet modifies the configuration of a runbook.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Description<String>
Provides a description for a runbook.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String>
Specifies the ID of a runbook.
Aliases
RunbookId
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-LogDebug<Boolean>
Indicates whether debug output is logged.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-LogProgress<Boolean>
Indicates whether log progress output is logged.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-LogVerbose<Boolean>
Indicates whether verbose output is logged.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a runbook.
Aliases
RunbookName
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Update a runbook configuration
This command adds a description to the runbook named Runbook01, and enables all logging options.
PS C:\> Set-SmaRunbookConfiguration -Name "Runbook01" -WebServiceEndpoint
"https://localhost" -Description "First runbook" -LogDebug $True -LogProgress $True LogVerbose $True
Related topics
Get-SmaRunbook
Set-SmaSchedule
Set-SmaSchedule
Creates or modifies a schedule in Service Management Automation.
Syntax
Parameter Set: Default
Set-SmaSchedule -ExpiryTime <DateTime> -Name <String> -ScheduleType <String> -StartTime
<DateTime> -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Description <String> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [
<CommonParameters>]
Detailed Description
The Set-SmaSchedule cmdlet creates or modifies a schedule in Service Management Automation.
Specify the name and type of the schedule, and the start and end times.
You can modify only the description when you run this cmdlet against an existing schedule. Start time,
expiry time, and day interval can only be set when creating a schedule with this cmdlet.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Description<String>
Provides a description for the schedule.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ExpiryTime<DateTime>
Specifies when, as a DateTime object, the schedule ends. To obtain a DateTime object, use the GetDate cmdlet. For more information, type Get-Help Get-Date.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a schedule.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ScheduleType<String>
Specifies the type of schedule. Valid values for this parameter are:
-- OneTimeSchedule
-- DailySchedule
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-StartTime<DateTime>
Specifies when, as a DateTime object, the schedule starts. To obtain a DateTime object, use the GetDate cmdlet.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Create a schedule
The first command creates a date object by using the Get-Date cmdlet, and then stores the object in
the $StartDate variable. This object reflects the current time.
The second command creates a date object by using the Get-Date cmdlet, and then stores the object
in the $EndDate variable. The command specifies a future time. For more information, type Get-Help
Get-Date.
The last command sets the schedule named Schedule01 to begin at the time stored in $StartDate and
end at the time stored in $EndDate
PS C:\> $StartDate = Get-Date
PS C:\> $EndDate = Get-Date -Day 12 -Month 6 -Year 2023
PS C:\> Set-SmaSchedule -StartTime $StartDate -ExpiryTime $EndDate -Name "Schedule01" ScheduleType "DailySchedule" -WebServiceEndpoint "https://contoso.com/app01"
Related topics
Get-SmaSchedule
Remove-SmaSchedule
Set-SmaVariable
Set-SmaVariable
Creates or modifies a variable in Service Management Automation.
Syntax
Parameter Set: Default
Set-SmaVariable -Name <String> -Value <Object> -WebServiceEndpoint <String> [AuthenticationType <String> ] [-Credential <PSCredential> ] [-Description <String> ] [Encrypted] [-Force] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Set-SmaVariable cmdlet creates or modifies a variable in Service Management Automation.
Specify the name of the variable and a value.
To encrypt the variable, use the Encrypted parameter. You cannot modify the encrypted state of a
variable after creation. Using the Encrypted parameter on an existing, non-encrypted, variable fails.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Description<String>
Provides a description for the variable.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Encrypted
Indicates that the variable should be encrypted.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Force
Modifies the variable without prompting you for confirmation. The cmdlet prompts you for confirmation
before it proceeds if you provide a SecureString as the value for the Value parameter, or if the value
contains an object with SecureString as a field and you do not use the Encrypted parameter.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a variable.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Value<Object>
Specifies a value for the variable.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Assign a value to a variable
This command assigns the value String07 to the variable named Variable01 for the specified web
service endpoint. Because the command specifies the Encrypted parameter, it encrypts the variable.
PS C:\> Set-SmaVariable -Name "Variable01" -Value "String07" -WebServiceEndpoint
"https://contoso.com/app01" -Encrypted
Related topics
Get-SmaVariable
Remove-SmaVariable
Start-SmaRunbook
Start-SmaRunbook
Starts a runbook job.
Syntax
Parameter Set: ByRunbookName
Start-SmaRunbook -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Name <String> ] [-Parameters <IDictionary> ] [-Port <Int32> ] [ScheduleName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: ByRunbookId
Start-SmaRunbook -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential
<PSCredential> ] [-Id <String> ] [-Parameters <IDictionary> ] [-Port <Int32> ] [ScheduleName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Start-SmaRunbook cmdlet starts a runbook job. Specify the ID or name of a runbook and the web
service endpoint. If necessary, specify the port of the Service Management Automation web service.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String>
Specifies the ID of a runbook.
Aliases
RunbookId
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Name<String>
Specifies the name of a runbook.
Aliases
RunbookName
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Parameters<IDictionary>
Specifies a hash table of key/value pairs. The keys in the hash table are the runbook parameter names.
The values in the hash table are the runbook parameter values.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-ScheduleName<String>
Specifies the name of a job schedule on which to start the runbook. To create a schedule in Service
Management Automation, use the Set-SmaSchedule cmdlet.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Start a runbook job
This command starts the runbook named Runbk01, specifying the parameters for the runbook job.
PS C:\> Start-SmaRunbook -WebServiceEndpoint https://localhost -Name "Runbk01" -Parameters
@{"StringParam"="Value"; "IntParam"=2}
Related topics
Set-SmaSchedule
Edit-SmaRunbook
Get-SmaRunbook
Publish-SmaRunbook
Import-SmaRunbook
Remove-SmaRunbook
Stop-SmaJob
Stop-SmaJob
Stops a Service Management Automation job.
Syntax
Parameter Set: Default
Stop-SmaJob -Id <String> -WebServiceEndpoint <String> [-AuthenticationType <String> ] [Credential <PSCredential> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Stop-SmaJob cmdlet stops a Service Management Automation job. Specify a running Service
Management Automation job and the web service endpoint. If necessary, specify the port of the Service
Management Automation web service.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String>
Specifies the ID, as a string, of a Service Management Automation job.
Aliases
JobId
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Stop a Service Management Automation job
This command stops the job with the ID of 2989b069-24fe-40b9-b3bd-cb7e5eac4b64.
PS C:\> Stop-SmaJob -WebServiceEndpoint https://localhost -Id "2989b069-24fe-40b9-b3bdcb7e5eac4b64"
Related topics
Get-SmaJob
Resume-SmaJob
Suspend-SmaJob
Suspend-SmaJob
Suspend-SmaJob
Suspends a Service Management Automation job.
Syntax
Parameter Set: Default
Suspend-SmaJob -Id <String> -WebServiceEndpoint <String> [-AuthenticationType <String> ] [Credential <PSCredential> ] [-Port <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed Description
The Suspend-SmaJob cmdlet suspends a Service Management Automation job. Specify a running
Service Management Automation job and the web service endpoint. If necessary, specify the port of the
Service Management Automation web service.
To resume a suspended job, use Resume-SmaJob cmdlet.
Parameters
-AuthenticationType<String>
Specifies the authentication type. Valid values are: Basic, Windows.
Windows is the default value. If you use Basic authentication, you must provide credentials by using the
Credential parameter.
Aliases
none
Required?
false
Position?
named
Default Value
Windows
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the Service
Management Automation web service. To obtain a credential object, use the Get-Credential cmdlet.
For more information, type Get-Help Get-Credential.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Id<String>
Specifies the ID, as a string, of a Service Management Automation job.
Aliases
JobId
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
True (ByValue)
Accept Wildcard Characters?
false
-Port<Int32>
Specifies the port number of the Service Management Automation web service.
Aliases
none
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the Service Management Automation web service. Include the
protocol, for example, http:// or https://.
Aliases
none
Required?
true
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-Confirm
Prompts you for confirmation before executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Required?
false
Position?
named
Default Value
none
Accept Pipeline Input?
false
Accept Wildcard Characters?
false
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, OutBuffer, and -OutVariable. For more information, see about_CommonParameters.
Examples
Example 1: Suspend a Service Management Automation job
This command suspends the job with the ID of "2989b069-24fe-40b9-b3bd-cb7e5eac4b64".
PS C:\> Suspend-SmaJob -JobId "2989b069-24fe-40b9-b3bd-cb7e5eac4b64" -WebServiceEndpoint
"https://localhost"
Related topics
Get-SmaJob
Resume-SmaJob
Stop-SmaJob