Use redirection to $null instead of Out-Null (fix #651)

This commit is contained in:
Roey Darwish Dror
2021-02-22 10:37:35 +02:00
parent 358fbd8c02
commit eb358c1a88

View File

@@ -93,7 +93,7 @@ pub fn upgrade_store_apps(ctx: &ExecutionContext) -> Result<()> {
print_separator("Microsoft Store");
println!("Updating Microsoft Store applications in the background");
ctx.run_type().execute(sudo).arg(path).args(&["-NoProfile", "-Command", "(Get-WmiObject -Namespace 'root\\cimv2\\mdm\\dmmap' -Class 'MDM_EnterpriseModernAppManagement_AppManagement01').UpdateScanMethod() | Out-Null"]).check_run()
ctx.run_type().execute(sudo).arg(path).args(&["-NoProfile", "-Command", "(Get-WmiObject -Namespace 'root\\cimv2\\mdm\\dmmap' -Class 'MDM_EnterpriseModernAppManagement_AppManagement01').UpdateScanMethod() > $null"]).check_run()
}
pub fn reboot() {