July PowerShell One-Liner

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.
Read More

Inventory Report to XML

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.
Read More

Status Indicators with PowerShell and PolyMonRT

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.
Read More

Get Network Connections

I love that part of my job is helping people out in the forums as ScriptingAnswers.com. 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
Read More

Create A Remote File Share

This topic came up recently in the PowerShell forum at ScriptingAnswers.com 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.
Read More

February PowerShell One-Liner

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.
Read More

Editing PrimalForms

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.
Read More

PowerShell WMI Wizard

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.
Read More

RSS SAPIEN Info Center

Search the Archives

Join our mailing list

Enter your email address to subscribe to our mailing lists for Monthly Blog Digests, Product Announcements and more (you can choose which you receive once you sign-up!)

Tags

Categories

Archives

BlogRoll

PowerShell Links

Information

Dashboard