< Back

Invoke-SmaScript

Thu Jan 16, 2020 9:46 am

NAME Invoke-SmaScript



SYNOPSIS







SYNTAX

Invoke-SmaScript [-ScriptID] <Int32> [-TargetMachineID] <Array> [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

Runs a specified script agains a list of given machineIDs





PARAMETERS

-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-ScriptID <Int32>

The ID of the script you'd like to execute.



Required? true

Position? 0

Default value 0

Accept pipeline input? False

Accept wildcard characters? false



-TargetMachineID <Array>

Specifies the machine ids to target. Multiples should be comma-seperated.



Required? true

Position? 1

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

Shows what would happen if the cmdlet runs. The cmdlet is not run.



Required? false

Position? named

Default value False

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

Int32







NOTES





output 0=Failure



output non-0 = the given runNow ID



-------------------------- EXAMPLE 1 --------------------------



Invoke-SmaScript -ScriptID 1234 -TargetMachineIDs 5678,2345,4567



Runs a script with ID 1234 against machines with IDs 5678,2345,4567



RELATED LINKS

Online Version: https://github.com/ArtisanByteCrafter/K ... aScript.md