Suppress unnecessary errors

This commit is contained in:
Manuel Thalmann 2023-07-03 01:14:34 +02:00
parent e2de8ec4b4
commit e8a6492566
2 changed files with 6 additions and 6 deletions
scripts/Windows/Scripts

View file

@ -209,9 +209,9 @@ class Context {
param ($logon)
$path = $logon.PSPath;
Set-ItemProperty $path -Name "AutoAdminLogon" 0;
Remove-ItemProperty $path -Name "DefaultDomainName";
Remove-ItemProperty $path -Name "DefaultUserName";
Remove-ItemProperty $path -Name "DefaultPassword";
Remove-ItemProperty $path -Name "DefaultDomainName" -ErrorAction SilentlyContinue;
Remove-ItemProperty $path -Name "DefaultUserName" -ErrorAction SilentlyContinue;
Remove-ItemProperty $path -Name "DefaultPassword" -ErrorAction SilentlyContinue;
});
}