Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $sqlinstancename = "MSSQL13.MSSQLSERVER"
- $SQLBinPath = (Get-ItemProperty ([io.path]::combine("HKLM:\SOFTWARE\Microsoft\Microsoft SQL Server", $sqlinstancename, "Setup"))).SQLBinRoot
- $param = @{
- ExclusionExtension = "mdf", "ldf", "ndf" , "bak", "trn"
- ExclusionProcess = (Get-Item (Join-Path $SQLBinPath "sqlservr.exe"))
- ExclusionPath = "C:\Windows\Cluster"
- }
- Set-MpPreference @param
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement