Get-ChildItem exclusion from file
Hi, how load exceprion from some file, instead of: ?{($_.fullname -notmatch "foldername")} . The list can be very lage

Get-WMIObject Win32_LogicalDisk -filter "DriveType = 3" -ComputerName $computer  -ErrorAction SilentlyContinue | 

%{Get-ChildItem ('\\' + $computer + '\' + ($_.DeviceID).remove(1) + '$\*') -File *.doc,*.docx -Recurse  -Force -ErrorAction SilentlyContinue | 

?{($_.fullname -notmatch "Windows") -and ($_.fullname -notmatch "Program Files") -and ($_.fullname -notmatch "Program Files (x86)")} |

Add-Content $env:TEMP\$computer.txt


Thank!
September 5th, 2015 3:38am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics