pytorch/.github/actions/setup-win
Huy Do 9f39123d18 Allow to continue when fail to configure Windows Defender (#103454)
Windows Defender will soon be removed from the AMI.  Without the service, the step fails with the following error:

```
Set-MpPreference : Invalid class
At C:\actions-runner\_work\_temp\1f029685-bb66-496d-beb8-19268ecbe44a.ps1:5 char:1
+ Set-MpPreference -DisableRealtimeMonitoring $True
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : MetadataError: (MSFT_MpPreference:root\Microsoft\...FT_MpPreference) [Set-MpPreference],
    CimException
    + FullyQualifiedErrorId : HRESULT 0x80041010,Set-MpPreference
```

For example, https://github.com/pytorch/pytorch-canary/actions/runs/5267043497/jobs/9521809176.  This is expected as the service is completely removed.

Here are all the places where `Set-MpPreference` is used according to https://github.com/search?type=code&q=org%3Apytorch+Set-MpPreference
Pull Request resolved: https://github.com/pytorch/pytorch/pull/103454
Approved by: https://github.com/atalman
2023-06-15 18:30:58 +00:00
..
action.yml Allow to continue when fail to configure Windows Defender (#103454) 2023-06-15 18:30:58 +00:00