PowerShell_Scripts/ansible/Update-ViaAnsible.ps1

11 lines
361 B
PowerShell

[CmdletBinding()]param(
[string[]]$Remotes = 'All',
[switch]$RawOutput,
[switch]$PassThruOnly
)
Invoke-ViaAnsible -Command "Update-OSz -Mode Auto" -Remotes:$($Remotes.ToLower()) -RawOutput:$RawOutput | ForEach-Object {
if( $PassThru ) { return $_ }
$_ | Select-Object Machine, RunTime, @{L='Output';E={$_.Output | Select-Object -last 4}}
}