Recent Articles on MCPMag

I’ve been busy working on some articles for and wanted to share a couple of stubs to my most recent articles.

Gathering Installed Software Using PowerShell

If there is one thing an administrator finds themselves doing, it is probably determining what software is installed on their system. It could be simply for just knowing what they have installed, or determining if some software installed may have vulnerabilities which are fixed via a security update or performing an audit for software (which may not have been approved to be installed). Either way, having a means to locate this software can be difficult if you do not have tools like SCCM or another third-party tool available to perform this type of audit.

PowerShell can help us in gathering the software on a local or remote system by giving us a couple of different options to perform the software gathering. One is through WMI and another is by looking in the registry.

The WMI Approach
I’m going to cover the WMI first only because you should never use it as a means to collect data on installed software. I’m talking about the Win32_Product class in WMI. This class is misused in a number of scripts because while it does provide you the information about the installed software, it comes with a cost associated with it.

To show this, I will perform a WMI lookup for software and then show you what happens as we are receiving data from WMI on installed software from this class.

More of this is available at


Creating Shares in Windows Using the SmbShare Module in PowerShell

Working with Windows shares, you can easily create a location for others to use to store data using a simple share name that could map several folders down in a server (or client). This allows for better simplicity of gaining access to these resources for all users. For the longest time, the best way to create a share was going through the UI by clicking on a folder, and going through the motions to create a share on the folder and then assign the proper share permissions for the newly created resource.

PowerShell was able to be used as well in this, but you had to have some knowledge of WMI and being able to properly create the share and ensure that you picked the right type of share (disk in this case). This wasn’t exactly user friendly as the method to create the share required an integer to represent the type of share. So if you didn’t know the right number for a disk share (it’s 0), then you might find yourself on the receiving end of errors or looking up the proper number to create the right kind of share. Adding users or groups to the share permissions is another thing all together. Working with the proper access type (yes, more integers to work with here) as well as creating the acceptable trustee format will make you wish for an easier approach to all of this.

More of this is available at

I have more blog content queued up here so stay tuned as I begin working through and publishing the articles and also keep watching MCPMag as I continue to produce some great articles on that site as well.

This entry was posted in powershell and tagged , , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s