May 4th, 2017 by Charlie Russel and tagged Calculated Column, Comment-Based Help, Disk Free Space, ErrorAction, Format-Table, Formatting output, Pipeline, PowerShell, PowerShell Function, Process{}, WMI
Today’s post comes by way of a co-worker, Robert Carlson, who took my previous post on getting the free disk space of remote computers and offered a very useful suggestion — instead of outputting strings, which is only useful for a display or report, he suggests creating a PSCustomObject and outputting that. Slick! I like it. […]
Posted in IT Admin, PowerShell, PowerShell Functions | Comments Off on Guest Post — Get-myFreeSpace Revisited
April 18th, 2017 by Charlie Russel and tagged Calculated Column, Comment-Based Help, Disk Free Space, ErrorAction, Format-Table, Formatting output, Pipeline, PowerShell, Process{}, WMI
Several years ago, I wrote a fairly simplistic script to get the free disk space of remote computers. It wasn’t all that sophisticated, but it got the job that I needed done, so I shared it here on my blog, since I thought others might find it useful. Which, based on the number of hits here, […]
Posted in Annoyances, Network Administration, PowerShell, Windows Server, WMI | 4 Comments »
September 29th, 2016 by Charlie Russel and tagged PowerShell, Services, WMI
One of the first things I check when I am troubleshooting a system is whether all the services that should be running, are. I could just open up services.msc, click on the “Startup Type” column to sort by the startup type, and scroll down through the Automatic services to see which ones aren’t running. But […]
Posted in Network Administration, PowerShell, WMI | 2 Comments »
June 27th, 2015 by Charlie Russel and tagged Get-WmiObject, PowerShell, PowerShell v3, Remove-PSDrive, Remove-SmbMapping, WMI
Unmapping network drives with PowerShell should be easy, and it is, but with some caveats. If you always create your network drive mappings with New-PSDrive, then it’s easy to unmap them with Remove-PSDrive. But if some of them are created with Group Policy, some of them with the legacy “net use” commands, some of them […]
Posted in PowerShell, WMI | 4 Comments »
November 26th, 2014 by Charlie Russel and tagged Calculated Column, Disk Free Space, Format-Table, Formatting output, WMI
(For an updated version of this post and script, see Getting the Free Disk Space of Remote Computers Revisited.) This started out as a simple script to try to get the free space on one of my servers, but I quickly discovered that using WMI’s Win32_LogicalDisk could only give me part of the solution. The […]
Posted in Network Administration, PowerShell, Windows Server, WMI | 33 Comments »
September 9th, 2014 by Charlie Russel and tagged DIMM, Memory, PowerShell, RAM, WMI
OK, so I needed to know exactly what RAM was installed on a computer and how many slots there were. I could have had the user shutdown his machine, opened up the box, got out a flashlight, popped out the DIMMs, written down the obscure part numbers, plugged them back in, and closed it up. […]
Posted in Hardware, PowerShell, WMI | Comments Off on Finding out what RAM DIMMs are installed on a computer without opening the box
June 15th, 2013 by Charlie Russel and tagged Format-Table, Formatting output, PowerShell, WMI
In my ongoing quest to remove dependency on legacy DOS commands, I recently created this script to get a list of all the local and mapped drives on a machine and how much free space each has on it. This script could be easily extended to display additional information (such as the underlying filesystem type) […]
Posted in PowerShell, WMI | 1 Comment »
April 6th, 2012 by Charlie Russel and tagged Backup, Hyper-V, WMI
So, a good friend and fellow MVP asked me for a script to shut down all running virtual machines on a server so she could do cold backups of them. This seemed like a perfectly reasonable request, and my first thought was “Well, this gets really obvious and easy in Windows Server 8” since we […]
Posted in Hyper-V, WMI | Comments Off on Stopping All Running Virtual Machines (Hyper-V)
March 15th, 2011 by Charlie Russel and tagged Exchange, PowerShell, Remoting, WMI
In my environment, with a virtualized SBS 2011 Standard, there are occasionally Microsoft Exchange 2010 services that don’t properly restart if there has been an abrupt power failure on the Hyper-V host. (Don’t ask.) Now, of course, the first time this happened, I just logged in to the server and started the services. But when […]
Posted in Exchange, PowerShell, SBS, WMI | 2 Comments »
February 15th, 2011 by charlie and tagged Hyper-V, PowerShell, WMI
I’ve started an article over on the PowerShell Survival Guide Wiki to drop in quick hits how to do “stuff” with Hyper-V, using PowerShell and the native WMI interface of Hyper-V. The WMI namespace for Hyper-V is “root\virtualization”. Turns out managing Hyper-V isn’t as hard as I thought, at least in no small part because […]
Posted in Hyper-V, PowerShell, Windows Server, WMI | Comments Off on PowerShell, Hyper-V and WMI