Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.
Just a quick one today, but a tip I hope I remember. While working on a script, I wanted to just get backup files in PoSh. I tried this:
Get-ChildItem -Path $BackupPath -File -Include *.bak
That got me this:
Nothing.
Why not? Apparently, you need the –Recurse parameter, even though there are no subdirectories in this folder. A bug, IMHO, but who knows. In any case, adding the parameter makes things work. Thanks, SO.
SQLNewBlogger
This was a quick 5 minute thing. After researching and testing for 10 minutes, and finding the solution, I wrote this up.
You could do that with anything you get working.