PowerShell_Scripts/ansible/Update-ViaAnsible.ps1
lksz a64d3c83af Updated Ansible scripts
Cleaner output, with focus on last lines of output by default
2021-05-08 17:46:33 -04:00

10 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}}
}