Last February I wrote an article for Simple-Talk called Let PowerShell do an Inventory of your Servers. This script was useful to me then, and it continues to be so, but it recently ran into a glitch.
Here is the code in the script to gather data on each file used by a database:$fgs = $db.FileGroups foreach ($fg in $fgs) { $files = $fg.Files $outnm = ".\" + $svr + "\" + $instnm + $dbtype + "" + $dbname + "DataFiles.csv" $files | select $db.Name, Name, FileName, Size, UsedSpace | export-csv -...
No comments yet, be the first one to post comment.