If (a Get - Service MpsSvc * |? {$_. The Name - eq 'MpsSvc})
{
The Set - Service MpsSvc - StartupType Automatic
Start - SetupService - ServiceName MpsSvc
}
"Is generated when the following error:" Microsoft.PowerShell.Com mands. ServiceCommandException: due to the following errors unable to configure service "Windows Defender is Firewall (MpsSvc)" : access denied, - & gt; System.Com ponentModel. Win32Exception: access denied,
- at the end of the inner exception stack trace -,
"
CodePudding user response:
The firewall service didn't open?CodePudding user response:
Run as an administrator,