Skip to content

Instantly share code, notes, and snippets.

@rycuda
Created October 22, 2015 11:27
Show Gist options
  • Save rycuda/47a7096a9996d6f97bb6 to your computer and use it in GitHub Desktop.
Save rycuda/47a7096a9996d6f97bb6 to your computer and use it in GitHub Desktop.
Powershell snippet to check ninite for application update status
$applications =@();
if ($true) {
$_status, $_appstatus = cmd /c .\niniteone.exe /audit /silent . ;
if (-not ($status -like 'Failed*')) {
while ($_appstatus) {
$_item, $_appstatus = $_appstatus ;
$_name, $_status = $_item.split(':');
$_application = new-object -typename psobject -prop (@{'name' = $_name; 'status' = $_status.trim()}) ;
$applications += ,$_application;
}
}
}
$applications | ?{$_.status -like 'Update*'}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment