Suppress unnecessary errors
This commit is contained in:
parent
e2de8ec4b4
commit
e8a6492566
2 changed files with 6 additions and 6 deletions
scripts/Windows/Scripts
|
@ -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;
|
||||
});
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue