< Back

LocalScript

Sat Jan 11, 2020 4:05 am

NAME LocalScript



SYNOPSIS

Autonance DSL task to invoke a local script block.





SYNTAX

LocalScript [-Credential <PSCredential>] [-ScriptBlock] <ScriptBlock> [<CommonParameters>]





DESCRIPTION

The LocalScript task is part of the Autonance domain-specific language

(DSL). The task will invoke the script block on the local computer. 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

-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? 1

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