Information from the Tenable Nessus Agent, as far as I'm aware, is only available when using the Nessus Client command line application (NessusCli.exe). In this post, I'm going to show how we can capture this with PowerShell. I'm going to walk through how I do this step-by-step. If you're looking for just the script, …
Read MoreI've been getting the following error when trying to access a new Excel COM object: Unable to cast COM object of type 'Microsoft.Office.Interop.Excel.ApplicationClass' to interface type 'Microsoft.Office.Interop.Excel._Application'. This operation failed because the QueryInterface call on the COM component for the …
Read MoreI wrote the following script to find and list attached USB Mass Storage Devices and determine the disks and partitions associated with them. 1$usbKeysAttached = Get-PnpDevice -Class USB -Status OK -FriendlyName "USB Mass Storage Device" 2 3$aAttachedDisks = @() 4 5ForEach($key in $usbKeysAttached) { 6 …
Read MoreToday's quick PoSH tip comes from a conversation I had with Kevin Crouch (@PsychoData) and Brett Miller (@BrettMiller_IT), and I got to learn about the $PSDefaultParameterValues variable, which I'd never used before. Essentially, $PSDefaultParameterValue allows you to define ahead of your functions how certain …
Read MoreI'm working on a project to get a number of drivers updated across an environment. One of the biggest problems is that if we update certain audio, video, or network drivers while the user is in a Skype call, the call will fail. Often in testing I found that reconnecting to the Skype call or presentation was difficult …
Read MoreI've found myself hanging around some PowerShell chats lately, and I've been picking up on a lot of neat tricks to write better code. This one comes my way via Adam Cook from his blog post on his awesome new function Get-CMUnusedSources (seriously, if you're a ConfigMgr shop, check it out). Since PowerShell is one of …
Read MoreI haven't blogged about it a lot, but I am trying to learn what I can about PowerShell on Linux. I feel like more and more services are headed to the cloud, and (even in Azure) will be able to run on Linux devices. Being able to write portable scripts to move between what I manage today, and what I may be asked to …
Read MoreIn a post last week, I talked about how I've begun using YNAB in 2019 to manage my finances. As soon as I learned there was an API, you know I had to dig in and see what it could do. Below I've posted a short PowerShell script to query all credit cards and lines of credit and then dump them out to the console. Nothing …
Read More