< Back
Invoke-AzureRmServerManagementPowerShellCommand
Post
NAME Invoke-AzureRmServerManagementPowerShellCommand
SYNOPSIS
Executes a Windows PowerShell script block on a node.
SYNTAX
Invoke-AzureRmServerManagementPowerShellCommand [-ResourceGroupName] <String> [-NodeName] <String> [-SessionName] <String> [-Command]
<ScriptBlock> [-DefaultProfile <IAzureContextContainer>] [-PowerShellSessionName <String>] [-RawOutput] [<CommonParameters>]
Invoke-AzureRmServerManagementPowerShellCommand [-Session] <Session> [-Command] <ScriptBlock> [-DefaultProfile <IAzureContextContainer>]
[-PowerShellSessionName <String>] [-RawOutput] [<CommonParameters>]
DESCRIPTION
The Invoke-AzureRmServerManagementPowerShellCommand cmdlet executes a Windows PowerShell script block on a node managed by an Azure Server
Management Gateway.
PARAMETERS
-Command <ScriptBlock>
Specifies the script block to run on the target node.
Required? true
Position? 3
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-NodeName <String>
Specifies the name of the node to run the script block on.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PowerShellSessionName <String>
Specifies the name of the Windows PowerShell run space on the target node.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-RawOutput [<SwitchParameter>]
Indicates that the cmdlet returns the complete object that contains the output from the node.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group that the node belongs to.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Session <Session>
Specifies the Session object that this cmdlet uses to connect to the target node.
This parameter may be specified instead of the ResourceGroupName , NodeName , SessionName , and PowerShellSessionName parameters.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-SessionName <String>
Specifies the name of the session to manage the node.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
Session
Parameter 'Session' accepts value of type 'Session' from the pipeline
OUTPUTS
System.Object
NOTES
1:
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ellcommand
Azure Server Management Cmdlets
SYNOPSIS
Executes a Windows PowerShell script block on a node.
SYNTAX
Invoke-AzureRmServerManagementPowerShellCommand [-ResourceGroupName] <String> [-NodeName] <String> [-SessionName] <String> [-Command]
<ScriptBlock> [-DefaultProfile <IAzureContextContainer>] [-PowerShellSessionName <String>] [-RawOutput] [<CommonParameters>]
Invoke-AzureRmServerManagementPowerShellCommand [-Session] <Session> [-Command] <ScriptBlock> [-DefaultProfile <IAzureContextContainer>]
[-PowerShellSessionName <String>] [-RawOutput] [<CommonParameters>]
DESCRIPTION
The Invoke-AzureRmServerManagementPowerShellCommand cmdlet executes a Windows PowerShell script block on a node managed by an Azure Server
Management Gateway.
PARAMETERS
-Command <ScriptBlock>
Specifies the script block to run on the target node.
Required? true
Position? 3
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-DefaultProfile <IAzureContextContainer>
The credentials, account, tenant, and subscription used for communication with azure.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-NodeName <String>
Specifies the name of the node to run the script block on.
Required? true
Position? 1
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-PowerShellSessionName <String>
Specifies the name of the Windows PowerShell run space on the target node.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-RawOutput [<SwitchParameter>]
Indicates that the cmdlet returns the complete object that contains the output from the node.
Required? false
Position? named
Default value False
Accept pipeline input? False
Accept wildcard characters? false
-ResourceGroupName <String>
Specifies the name of the resource group that the node belongs to.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Session <Session>
Specifies the Session object that this cmdlet uses to connect to the target node.
This parameter may be specified instead of the ResourceGroupName , NodeName , SessionName , and PowerShellSessionName parameters.
Required? true
Position? 0
Default value None
Accept pipeline input? True (ByValue)
Accept wildcard characters? false
-SessionName <String>
Specifies the name of the session to manage the node.
Required? true
Position? 2
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
Session
Parameter 'Session' accepts value of type 'Session' from the pipeline
OUTPUTS
System.Object
NOTES
1:
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... ellcommand
Azure Server Management Cmdlets