Open bdawson9 opened 6 years ago
(troubleshooting via email)
Hi Caleb,
I am also receive the exact same error as bdawson9 reported. Please let me know if you have found a solution or if you need me to help with troubleshooting.
Thanks!
Jason
Was there any update on this?
I have the same issue did anyone have anything that could help.
I found out the issue When there ins't any shares on that machine the $files variable is blank therefore the Regex can't compare anything because if you take the -filter out the script works great.
$Files = gwmi -Class win32share -ComputerName $computer | Where-Object{$.Name -NotMatch "^print|^NETLOGON|^MTATempStore|^prnproc"}
I get the following error message when running the File Shares powershell script:
Exception calling "Matches" with "2" argument(s): "Value cannot be null. Parameter name: input" At C:\scripts\file shares\FileShares.ps1:176 char:5