A unique problem recently presented itself- how to allowing multiple users to access a Linux VM in a secure fashion. Generic user accounts seemed like a poor idea to me, as they would likely end up being mismanaged. And shared accounts are, of course, a terrible idea. So, what to do? Well, I am, of…
PowerShell – Identify VMs w/ Particular OS in vSphere
With CentOS 7 reaching its end-of-life on June 30th of this year, it would be a good idea to identify any VMs with that particular OS. Doing so manually could prove tedious. Personally, I subscribe to the philosophy shared in Google’s SRE manual, and seek to eliminate such toilsome tasks. And PowerShell is a great…
ConfigMan – Teams – Disable Teams Autorun with PowerShell
Teams’ default behavior is to launch automatically upon user login. This can be undesirable for a myriad of reasons, and can be managed with Group Policy with a couple of caveats. The first is that this policy is a User configuration policy, and not a Computer configuration policy. The second is that the policy must…
PowerShell – ConfigMan – Convert OUs to Collections
With ConfigMan application deployments, it’s good practice to, when applicable, divide large groups up and take a staged approach at deployment. I’ve found myself multiple times creating multiple collections containing the objects within an Active Directory (AD) Organizational Unit (OU) for staged deployments. I decided to build a script to ease this process. This script…
PowerShell – Active Directory – Convert AD Name Formats
Many of the ActiveDirectory PowerShell module cmdlets expect the distinguished name format. I find this somewhat inconvenient, as this format does not read as nicely as the canonical name format that so many of us have become familiar with. Additionally, an objects’ canonical name is somewhat more readily available via the Active Directory Users and…
PowerShell – AD Cleanup – Get Extraneous Group Membership
If you have an Organizational Unit (OU) in Active Directory (AD) containing a large number of users, and you need to ensure these users are not members of any other groups, or perhaps that they are only members of certain groups, I’ve put a PowerShell script together for this purpose. It allowed me to quickly…
Azure – Fixing AAD Connect Sync Not Starting Post-Reboot
Some months ago, a problem was noticed with one of our servers that hosts the Azure AD Connect Sync service. After a reboot, the service did not automatically start back up as expected; and, upon further inspection, the synchronization from Azure > on-prem domain was not functional. In troubleshooting this issue, I took to the…
PowerShell – Extract Text From .PDF Files
A unique challenge presented itself the other day- to extract text from .PDF files. I found the iText-based PSwritePDF module in the PowerShell Gallery that offers this capability; however, I found it to be an incomplete solution due to the fact that many .PDF files (particularly those created with an automated tool, like GhostScript or…
PowerShell – Get Uninstall String Info from Registry
I’ve put together a simple function to extract the Uninstall String information from the Windows Registry. This is convenient for identifying the binary location and arguments to uninstall a given win32 application. Or, if the application was installed with a .msi file, the product code will often be specified – which, of course, can be…
PowerShell – Get Additional Application Info
The common method used to return win32 application information from a Windows device via PowerShell is ‘gwmi win32_product.’ This returns the more pertinent IdentifyingNumber, Name, Vendor, Version, and Caption properties, as shown in the below example output. However, Windows does have more information on these applications. Using the ‘wmic product get’ command, we can get…