Posts Tagged ‘wmi’


PrimalScript 2011’s WMI Browser gets an upgrade

Tuesday, September 6th, 2011 by Alex Riedel
We are always looking at improving our products or adding useful features. When we originally created the WMI part inside PrimalScript's object browser, it was all about WMI properties. But many WMI classes have methods too and we felt you should be able to see them. Many thanks also to all the users who let us know that this is a feature they need as soon as possible. We always appreciate hearing what you would like to see. So with this service build (6.0.150) we added WMI methods to the browser and generate help information on the fly as shown…   More »

July PowerShell One-Liner

Tuesday, July 7th, 2009 by Jeffery Hicks
This month's PowerShell one-liner queries the WMI Win32_Product class for a specified computer and builds a formatted report of all installed applications sorted by vendor. You'll be able to tell at a glance what is installed, when it was installed, where it was installed from and the product version. Be warned that querying this WMI class may take several minutes or longer. This one line expression defaults to the local computer, but you can substitute any computername you want. You can also add support for alternate credentials. I've broken the expression into several lines for publication purposes but this is in fact a oneline expression.   More »

Inventory Report to XML

Thursday, June 18th, 2009 by Jeffery Hicks
Lately I seem to be answering a number of PowerShell XML related questions. When that happens I figure its time for an example. I have a script that I think originally was posted in a forum. I apologize that I didn't note where it came from. But I've enhanced it (as I am likely to do). The script reads a bare bones XML file of computernames and builds a new XML file with inventory information such as operating system, computer system, logical disks and more retrieved from WMI. My script will hopefully serve as examples for working with XML files. I also use Write-Progress so that you can track what the script is doing.   More »

Status Indicators with PowerShell and PolyMonRT

Friday, March 20th, 2009 by Jeffery Hicks
In my last Mr. Roboto column, I wrote about the open source project, PolyMonRT. I recently suggested it to someone as a solution, especially because PolyMonRT supports PowerShell as a provider. My friend wanted to use the status light indicator to show when a particular service was running or not. Basically Green is good and Red is not. It tool a little fiddling on my part but I came up with the process.   More »

Get Network Connections

Thursday, March 19th, 2009 by Jeffery Hicks
I love that part of my job is helping people out in the forums as A recent post asked about finding out what network drives were mapped on a remote computer using PowerShell. The task sounded familiar so I poked around my script pile and found an old VBScript that used WMI and the Win32_NetworkConnection class. Great. Get-WMIObject to the rescue: Get-WMIObject win32_networkconnection -computername Desk23 You even get a nicely formatted summary. But you me, I can't resist tinkering so I wrote a function that enhances this basic command I call Get-NetConnection   More »

Create A Remote File Share

Thursday, March 12th, 2009 by Jeffery Hicks
This topic came up recently in the PowerShell forum at and I thought you might find it helpful. The issue was creating a file share remotely. In the "olden days", this would have meant using a command line tool like RMTSHARE, which is really just fine. But if you have a larger workflow, doing it natively in PowerShell may be more desirable. Let me show you how easy it is to create a file share using Windows Management Instrumentation (WMI). I wrote a function called New-FileShare.   More »

February PowerShell One-Liner

Tuesday, February 3rd, 2009 by Jeffery Hicks
If you subscribe to the SAPIEN newsletter you should have seen this already. If not, why don't you take a moment to subscribe? Each month you'll get all the latest product and training news from SAPIEN Technologies as well as useful tips like this Powershell one-liner that produces a report on event log sizes for multiple computers.   More »

Editing PrimalForms

Thursday, January 22nd, 2009 by Jeffery Hicks
I continue to play with PrimalForms and I know many of you are as well. I thought I'd share a few other techniques for creating scripts and moving between the code generated by PrimalForms and the script you create in PrimalScript. One technique that I've started using is to leverage PrimalScript's snippet feature.   More »

WMI Live

Monday, December 22nd, 2008 by Alex Riedel
Similar to the enhanced SQL support, PrimalScript 2009 provides enhanced WMI and WQL support. WMI is an important tool in the administrators arsenal. It allows you to accomplish many tasks, local and remote with very little effort. However, the sheer number of WMI classes and their properties can be overwhelming and make it sometimes hard to quickly discover what you need. The new object browser in PrimalScript 2009 lists all your WMI namespaces, their classes and each classes properties. The classes inside any given namespace are sorted and grouped by their prefix (CIM, WIN32 etc.), so you can more easily…   More »

PowerShell WMI Wizard

Thursday, December 11th, 2008 by Jeffery Hicks
If you are a long time PrimalScript user, you know that it has always had support and wizards for WMI. The upcoming PrimalScript 2009 adds some new WMI features. But I like to tinker, especially with PowerShell. So I created a simple PowerShell script that creates an expression using Get-WMIObject. Think of it as a PowerShell WMI Wizard script.   More »