Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- $monitoredExtensions = ((Invoke-WebRequest -Uri "https://fsrm.experiant.ca/api/v1/get" -UseBasicParsing).content | convertfrom-json | % {$_.filters})
- If (Test-Path .\SkipList.txt) {
- $Exclusions = Get-Content .\SkipList.txt
- ForEach ($Exclusion in $Exclusions) {
- if ($Exclusion) {
- $monitoredExtensions = $monitoredExtensions.replace($Exclusion.trim(),$null)
- }
- }
- }
- $Servers = Get-ADcomputer -Filter * -SearchBase "<OU TO YOUR SERVERS HERE>"| Select-Object -ExpandProperty name | Sort
- $Current = Get-FsrmFileGroup -Name "<YOUR CRYPTO FILE GROUP HERE>" | Select-Object -ExpandProperty includepattern
- $New = $Current + $monitoredExtensions | sort -Unique
- Invoke-Command -ComputerName $Servers -ArgumentList $New -ScriptBlock {Set-FSRMFileGroup -Name "<YOUR CRYPTO FILE GROUP HERE>" -Includepattern $args}
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement