I love how easy it is to manage computers with Windows PowerShell. It is a great reporting tool, but often I find people getting locked into one approach. I’m a big believer in flexibility and re-use and using objects in … Continue reading...
I think you’ll like this. Normally, I prefer my PowerShell commands to write objects to the pipeline. But there’s nothing wrong with sending output directly to the console, as long as you know that the output is intended only for … Continue...
Getting system information from WMI is a pretty straight-forward thing with Get-WMIObject . You can even specify one or more computer names or IP addresses to retrieve the information remotely. That's all great, but how would you design a function that encapsulates Get-WMIObject (or any other cmdlet...
I was poking around WMI the other day in PowerShell and was intrigued by the Win32_Share class. This is a great way to find out what items are shared on a server such as printers and folders, although it’s not … Continue reading → Read...
Earlier this week I was helping someone out on a problem working with the local administrators group. There are a variety of ways to enumerate the members of a local group. The code he was using involved WMI. I hadn’t … Continue reading →...
PowerShell and WMI just seem to go together like peanut butter and jelly, beer and pretzels, or salt and pepper. However, discovering things about WMI isn’t always so easy. There are plenty of tools and scripts that will help you … Continue...
Recently, a student implemented a function to stop a service remotely via WMI. Once done, she was concerned that someone accidentally stopped a service and wanted to add some sort of confirmation . Fortunately, she did not really have to implement confirmation herself. PowerShell can do that for you...
In the previous post, I demonstrated how PowerShell handles XML data and how easy it is to load XML from a file or the Internet and then analyze its content. Today, I'd like to share how you can change and append XML data. Creating Sample XML I'd like to start this by creating an XML template...
In January of this year, I wrote a basic article on PowerShell’s WMI Type Accelerators . A type accelerator is, in effect,a shortcut to some underlying .NET component. PowerShell comes with three type accellerators for WMI: [WMI] – a shortcut way of getting...