Hello. We have recently been rolling out File Server Resource Manager and using it to alert us of file names containing the word "*decrypt*". Our script reads the files to screen from a file called screen.txt. The excluded files in this File Group are read from WList.txt.
At this point we have multiple files to exclude in this file group, but when the script gets the content from the file, the file names (all separate lines in the text file) are all entered together on the same line, so instead of excluding:
it excludes File1File1File3.
Here is my code.
$FGroup = Get-Content C:\windows\ltsvc\scripts\Screen.txt
$WList = Get-Content C:\windows\ltsvc\scripts\wList.txt
New-FsrmFileGroup -name "CryptoFileScreen" -includepattern "$FGroup" -ExcludePattern "$WList"
Can anyone help me place this in a proper array?
Thanks for your time.