mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Add error catch for unauthorized access when removing AppLocker test files (#15881)
This commit is contained in:
@@ -444,6 +444,10 @@ namespace System.Management.Automation
|
||||
{
|
||||
// file is in use on Windows
|
||||
}
|
||||
catch (UnauthorizedAccessException)
|
||||
{
|
||||
// user does not have permissions
|
||||
}
|
||||
}
|
||||
|
||||
return false;
|
||||
|
||||
Reference in New Issue
Block a user