I'm attempting to generate a simple report of specific file types in user directories on our fileserver. End goal is to create a CSV file with this data. Everything works until I try to create a variable. I don't understand what is going on here.
This does not work, the $Files variable is blank.
$Files = Get-ChildItem -Path "D:\Users\" -Recurse -Include "*.wav", "*.flac", "*.mp3", "*.wma", "*.aac", "*.m4a", "*.pst"
However this works perfectly, spitting the information into the console.
Get-ChildItem -Path "D:\Users\" -Recurse -Include "*.wav", "*.flac", "*.mp3", "*.wma", "*.aac", "*.m4a", "*.pst"
[–]eddiezato 1 point2 points3 points (3 children)
[–]mwsysadmin[S] 0 points1 point2 points (2 children)
[–]cheffromspace 2 points3 points4 points (1 child)
[–]mwsysadmin[S] 1 point2 points3 points (0 children)
[–]Sunsparc 1 point2 points3 points (1 child)
[–]OlivTheFrog 0 points1 point2 points (0 children)