I have a new series of articles that will be focusing on trend reporting using PowerShell and SQL. Be sure to check them out and let me know what you think!
Books

Translate This Blog
-
Recent Posts
Top Posts
- Querying UDP Ports with PowerShell
- Create a Mouse Cursor Tracker using PowerShell and WPF
- Locating Mount Points Using PowerShell
- Setting up Local Administrator Password Solution (LAPS)
- Speedy Ping using PowerShell
- Building a TCP Server Using PowerShell
- Fix Duplicate WSUS ClientIDs Using PowerShell
- Make Your PowerShell Errors Less Harsh By Changing Their Color
- Getting the Icon from a File Using PowerShell
- Use the WSUS API and PowerShell to query the SUSDB Database
Archives
Categories
- .net
- api
- array
- background jobs
- binary
- book
- c#
- clock
- codeplex
- com object
- convert
- CTP
- database
- deep dive
- excel
- Favorites
- function
- groups
- guest blog
- hash table
- Internet Explorer
- ise
- mcpmag
- module
- MVP
- network
- news
- parameter
- patches
- performance
- pinvoke
- podcast
- port
- PoshChat
- poshpaig
- PoshRSJob
- poshwsus
- powercli
- powerscripting
- Powershell
- printers
- quickhits
- reflection
- regex
- registry
- Regular Expressions
- report
- resolution
- runspace
- runspaces
- scripting games 2012
- scripting games 2013
- scripting guy
- scripts
- SMO
- Speaker
- speaking
- SQL
- tcp
- tips
- tsql
- updates
- user group
- V3
- V4
- v5
- weather
- widget
- win32API
- winter scriting games 2014
- wmi
- word
- WPF
- wsus
- xaml
Is there a special reason you calculate the usedspaceGB from size and freespace, instead of just converting the usedspace value from the table to GB?
That would be a fail on my part. 🙂 The better approach would be to take the UsedSpace from the table and convert it to GB rather than wasting cycles on calculating for UsedSpace like I did. Must have been napping while writing out that code block.
Aww, that ended right now before the good stuff!
Always keep them wanting more, eh?
Good one, Boe!
😉 Thanks! I was back and forth between how I was going to split this up into 3 parts and figured it would make the most sense to do the data gathering as one part and then cover the SQL part as the next section.