Import-SmaRunbook
Import-SmaRunbook
Imports a runbook into .
Sintaxe
Parameter Set: Default
Import-SmaRunbook -Path <String> -WebServiceEndpoint <String> [-AuthenticationType <String> ] [-Credential <PSCredential> ] [-Port <Int32> ] [-Tags <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Descrição detalhada
The Import-SmaRunbook cmdlet imports a runbook into . The runbook must be a Usando o Windows PowerShell script (.ps1) file. Specify the path of a runbook and the web service endpoint. If necessary, specify the port of the web service.
Parâmetros
-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 |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
Windows |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
-Credential<PSCredential>
Specifies user credentials, as a PSCredential object, to use for the connection to the web service. To obtain a credential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential
.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
-Path<String>
Specifies the path to a runbook.
Aliases |
RunbookPath |
Necessário? |
true |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
-Port<Int32>
Specifies the port number of the web service.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
-Tags<String>
Specifies one or more runbook tags. Provide all tags within one string, separated by commas.
Aliases |
nenhuma |
Necessário? |
false |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
-WebServiceEndpoint<String>
Specifies the endpoint, as a URL, of the web service. Include the protocol, for example, http:// or https://.
Aliases |
nenhuma |
Necessário? |
true |
Posição? |
named |
Valor padrão |
nenhuma |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
-Confirm
Solicita que você confirme antes de executar o cmdlet.
Necessário? |
false |
Posição? |
named |
Valor padrão |
false |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
-WhatIf
Mostra o que aconteceria se o cmdlet fosse executado. O cmdlet não é executado.
Necessário? |
false |
Posição? |
named |
Valor padrão |
false |
Aceitar entrada do pipeline? |
false |
Aceitar caracteres curinga? |
false |
<CommonParameters>
Esse cmdlet dá suporte a parâmetros comuns: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer e -OutVariable. Para obter mais informações, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
O tipo de entrada é o tipo dos objetos que você pode canalizar para o cmdlet.
Saídas
O tipo de saída é o tipo de objeto emitido pelo cmdlet.
Exemplos
Example 1: Import a runbook into Service Management Automation
This command imports the runbook file named Runbook01.ps1 into the web service that has endpoint URL https://contoso.com/app01.
PS C:\> Import-SmaRunbook -Path "./Runbook01.ps1" -WebServiceEndpoint "https://contoso.com/app01"