< Back
RemoteScript
Post
NAME RemoteScript
SYNOPSIS
Autonance DSL task to invoke a remote script block.
SYNTAX
RemoteScript [-ComputerName] <String> [-Credential <PSCredential>] [-ScriptBlock] <ScriptBlock>
[<CommonParameters>]
DESCRIPTION
The RemoteScript task is part of the Autonance domain-specific language
(DSL). The task will invoke the script block on the specified Windows
computer using WinRM. A user account can be specified with the Credential
parameter. The script can use some of the built-in PowerShell functions to
return objects or control the maintenance:
- Throw an terminating error to stop the whole maintenance script
- Show status information with Write-Autonance
PARAMETERS
-ComputerName <String>
This task restarts the specified Windows computer.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Specifies a user account that has permission to perform the task.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ScriptBlock <ScriptBlock>
The script block to invoke.
Required? true
Position? 2
Default value
Accept pipeline input? false
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 (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Author : Claudio Spizzi
License : MIT License
RELATED LINKS
https://github.com/claudiospizzi/Autonance
SYNOPSIS
Autonance DSL task to invoke a remote script block.
SYNTAX
RemoteScript [-ComputerName] <String> [-Credential <PSCredential>] [-ScriptBlock] <ScriptBlock>
[<CommonParameters>]
DESCRIPTION
The RemoteScript task is part of the Autonance domain-specific language
(DSL). The task will invoke the script block on the specified Windows
computer using WinRM. A user account can be specified with the Credential
parameter. The script can use some of the built-in PowerShell functions to
return objects or control the maintenance:
- Throw an terminating error to stop the whole maintenance script
- Show status information with Write-Autonance
PARAMETERS
-ComputerName <String>
This task restarts the specified Windows computer.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-Credential <PSCredential>
Specifies a user account that has permission to perform the task.
Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false
-ScriptBlock <ScriptBlock>
The script block to invoke.
Required? true
Position? 2
Default value
Accept pipeline input? false
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 (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
NOTES
Author : Claudio Spizzi
License : MIT License
RELATED LINKS
https://github.com/claudiospizzi/Autonance