Import-AzAutomationRunbook
Importiert ein Automatisierungs-Runbook.
Syntax
Import-AzAutomationRunbook
[-Path] <String>
[-Description <String>]
[-Name <String>]
[-Tags <IDictionary>]
-Type <String>
[-LogProgress <Boolean>]
[-LogVerbose <Boolean>]
[-Published]
[-Force]
[-ResourceGroupName] <String>
[-AutomationAccountName] <String>
[-DefaultProfile <IAzureContextContainer>]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Beschreibung
Das Cmdlet Import-AzAutomationRunbook importiert ein Azure Automation-Runbook. Geben Sie den Pfad zu einer wps_2 Skriptdatei (PS1) an, die für wps_2- und wps_2 Workflow-Runbooks, (Graphrunbook)-Datei für grafische Runbooks oder (.py)-Datei für Python 2-Runbooks importiert werden soll. Für wps_2 Workflowrunbooks muss das Skript eine einzelne wps_2 Workflowdefinition enthalten, die dem Namen der Datei entspricht.
Beispiele
Beispiel 1: Importieren eines Runbook aus einer Datei
$Tags = @{"tag01"="value01"; "tag02"="value02"}
Import-AzAutomationRunbook -Path .\GraphicalRunbook06.graphrunbook -Tags $Tags -ResourceGroupName "ResourceGroup01" -AutomationAccountName "AutomationAccount01" -Type GraphicalPowershell
Der erste Befehl weist der variablen $Tags zwei Schlüssel/Wert-Paare zu. Mit dem zweiten Befehl wird ein grafisches Runbook namens "GraphicalRunbook06" in das Automatisierungskonto namens AutomationAccount01 importiert. Der Befehl weist auch die in $Tags gespeicherten Tags zu.
Beispiel 2
Importiert ein Automatisierungs-Runbook. (automatisch generiert)
Import-AzAutomationRunbook -AutomationAccountName 'AutomationAccount01' -Name 'Configuration01' -Path .\GraphicalRunbook06.graphrunbook -Published -ResourceGroupName 'ResourceGroup01' -Type PowerShell
Parameter
-AutomationAccountName
Gibt den Namen des Automatisierungskontos an, in das dieses Cmdlet ein Runbook importiert.
Type: | String |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Confirm
Hiermit werden Sie vor der Ausführung des Cmdlets zur Bestätigung aufgefordert.
Type: | SwitchParameter |
Aliases: | cf |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-DefaultProfile
Anmeldeinformationen, Konto, Mandant und Abonnement für die Kommunikation mit Azure
Type: | IAzureContextContainer |
Aliases: | AzContext, AzureRmContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Description
Gibt eine Beschreibung für das importierte Runbook an.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Force
ps_force
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LogProgress
Gibt an, ob das Runbook Statusinformationen protokolliert.
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-LogVerbose
Gibt an, ob das Runbook detaillierte Informationen protokolliert.
Type: | Nullable<T>[Boolean] |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Gibt den Namen des Runbook an, das dieses Cmdlet importiert.
Type: | String |
Aliases: | RunbookName |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Path
Gibt den Pfad einer PS1- oder GRAPHRUNBOOK-Datei an, die dieses Cmdlet importiert.
Type: | String |
Aliases: | SourcePath |
Position: | 2 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Published
Gibt an, dass dieses Cmdlet das von ihr importierte Runbook veröffentlicht.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
Gibt den Namen der Ressourcengruppe an, für die dieses Cmdlet ein Runbook importiert.
Type: | String |
Position: | 0 |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Tags
Schlüssel-Wert-Paare in Form einer Hashtabelle. Beispiel: @{key0="value0"; key1=$null; key2="value2"}
Type: | IDictionary |
Aliases: | Tag |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Type
Gibt den Typ des von diesem Cmdlet erstellten Runbook an. Gültige Werte sind:
- PowerShell
- GraphicPowerShell
- PowerShellWorkflow
- GraphicalPowerShellWorkflow
- Graph
- Python2 Der Wert Graph ist veraltet. Es entspricht GraphicPowerShellWorkflow.
Type: | String |
Accepted values: | PowerShell, GraphicalPowerShell, PowerShellWorkflow, GraphicalPowerShellWorkflow, Graph, Python2, Python3, Powershell72 |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-WhatIf
Zeigt, was geschieht, wenn das Cmdlet ausgeführt wird. Das Cmdlet wird nicht ausgeführt.
Type: | SwitchParameter |
Aliases: | wi |
Position: | Named |
Default value: | False |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Eingaben
Nullable<T>[[System.Boolean, System.Private.CoreLib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=7cec85d7bea7798e]]
Ausgaben
Ähnliche Themen
Azure PowerShell
Feedback
https://aka.ms/ContentUserFeedback.
Bald verfügbar: Im Laufe des Jahres 2024 werden wir GitHub-Issues stufenweise als Feedbackmechanismus für Inhalte abbauen und durch ein neues Feedbacksystem ersetzen. Weitere Informationen finden Sie unterFeedback senden und anzeigen für