Recently, a challenge presented itself in migrating a large archive of data from a Google Drive location (frankly, a rather costly storage option) to a local NAS storage device. I have been using PSGSuite to interface with the G Suite products, so I turned to it to see what my options were. I found them…
Category: PowerShell
Posts pertaining to PowerShell scripting
Cloud – Search and Destroy Malicious Emails From End Users’ G-Suite Mailboxes
If you are using managing an enterprise, you will undoubtedly encounter malicious emails targeting your end users. Ideally, you could delete these messages from within your end users’ mailboxes. Normally, this is a premium feature, but if you have configured your G-Suite environment to use PSGSuite, it can be accomplished with some pretty basic scripting….
IAM – PowerShell – Manual Entra Connect Sync via Script
Recently, the need for others to be able to force a manual sync from on-prem Active Directory (AD) to Entra became apparent. I knew this could be done with PowerShell, so I got to work writing a script. Users that may run this script will need to be in the local ‘ADSyncOperators’ group on your…
Cloud- Synchronize Profile Photos Between Federated Domains (Google, Azure)
Synchronization of profile photos between Google’s G Suite and Azure is not supported by the built-in Azure Provisioning engine. This must be accomplished by some other means. In my case, of course, I look to employ PowerShell for such automation tasks. As a prerequisite, you should have already followed PSGSuite’s intial setup procedure documented on…
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…
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…