I need to find a way to query all my SQL Servers and instances (I have a few, and I can list the IP Addresses in a text file) for all the Databases which take up more than 5GB, and I need it done in PowerShell which will export it into CSV.
I found some things that can get me started:
[System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SqlServer.SMO") | Out-Null
$servers = Get-Content 'servers.txt'
foreach ($sv in $servers)
I've found a lot of information in this Link
but I can't make heads or tails out of it since I'm not really proficient with PowerShell Scripting (Or scripting at all).
Can Any of you help me with this task?