Payton Flint's Tech Blog
Menu
  • Home
  • Blog
  • Categories
  • Resources
  • About
  • Contact
Menu

Category: PowerShell

Posts pertaining to PowerShell scripting

PowerShell – Convert PsExec-run Cmdlet Output Strings Back to Objects, Properties, & Values

Posted on August 14, 2023August 24, 2023 by paytonflint

I have been experimenting with using PsExec of the Sysinternals suite to gather information from remote Windows systems for diagnostic use. I’ve found it to be a powerful tool, especially when integrated with PowerShell scripts. It is able to execute a script or command on a remote machine and return the output back to the…

Read more

PowerShell – Programmatically Determine the Primary User of a Device

Posted on August 14, 2023August 21, 2023 by paytonflint

Configuration Manager includes the device property and concept of UserDeviceAffinity, with which the Primary User of a device can easily be determined and referenced. But, what if your environment does not have MECM in place? MECM is a lot of overhead for a small environment. How might one maintain this capability? Well, user log on…

Read more

PowerShell- Launch Applications With Other User Context Within Interactive Session

Posted on August 10, 2023 by paytonflint

There are many reasons one might want to establish a workflow in which they can quickly launch PowerShell or the ISE with alternative credentials from their interactive session, such as executing a script with a more privileged user context. To do so, create a script like the one below: Then, create a shortcut to execute…

Read more

Azure – Malicious Authentication Emulation and Mitigation

Posted on July 29, 2023July 29, 2023 by paytonflint

The attack surface of a cloud tenant should get a lot of consideration. It is important to understand that some legacy protocols, like SMTP, are not capable of accommodating multifactor authentication; and, although they are largely being deprecated, we may still see them in use. Attackers are particularly fond of these legacy protocols, as they…

Read more

PowerShell – Indulging the Memosphere – Invoke-Tune Function

Posted on July 18, 2023July 18, 2023 by paytonflint

I let my curiosity get the better of me, and I put together a PowerShell function for the purpose of creating music using PowerShell’s built-in console beep feature. And, in the very essence of internet meme culture, I present to you my triumph—a PowerShell function that unleashes the timeless anthem of Rick Astley’s ‘Never Gonna…

Read more

PowerShell- UltimateOCD Update + Demo

Posted on July 17, 2023July 17, 2023 by paytonflint

For the gentleman requesting assistance with my UltimateOCD script, I have revised it further to allow you to easily provide some parameters like the target directory, directory exclusions, and a custom temporary directory path. In addition, I have revised the logic to use the “product” & “x.x.x” (version number) directories to detect Oracle client instances….

Read more

Preliminary Batch Job Version – Ultimate Oracle Client Deinstaller

Posted on June 8, 2023June 29, 2023 by paytonflint

This is for the gentleman that kindly requested a modification of my UltimateOCD script to allow for batch deployment. Please note that this preliminary example is untested. I will be testing and revising in the days to come, but this may get you on the right track with some testing of your own. In the…

Read more

PowerShell – Update to Ultimate Oracle Deinstaller

Posted on April 17, 2023June 4, 2023 by paytonflint

A few months back, I had built what I dubbed the “Ultimate Oracle Client Deinstaller.” It could handle the deinstallation of Oracle database clients 11g, 12c, and 19c to include having multiple clients installed- even if they share the same Oracle_Home location. Recently, I ran into some alternate configurations of the Oracle client that required…

Read more

PowerShell – Add + Trust PsGallery & NuGet

Posted on March 18, 2023December 12, 2023 by paytonflint

If you do a lot of PowerShell work, you may find yourself frequently using NuGet or PsGallery. I’ve put a couple functions together that quickly add the PsGallery repository and NuGet respectively, and add trust to these sources. These functions were built to be modular so they could be modified for other sources as well….

Read more

PowerShell – Add Hosts to AD Group

Posted on February 1, 2023June 4, 2023 by paytonflint

Here’s another simple script I put together. It allows you to specify a Security Group in Active Directory, and add a list of hosts to this group. Simple, but yet another tool that every SysAdmin should have in their repository.

Read more
  • Previous
  • 1
  • 2
  • 3
  • 4
  • 5
  • Next

About The Author

Author's Portrait

In my journey as a technologist and 11 years of experience as an IT professional, I have found my niche as Director of Infrastructure Services; developing my skillsets in management, scripting, cloud infrastructure, identity management, and networking.

I have experience as a Systems Administrator and Engineer for large enterprises including the DoD, government agencies, and a nuclear-generation site.

I've been blessed to collaborate with engineers at esteemed Fortune 50 corporations, and one of Africa's largest, to ensure successful implementation of my work.

GitHub Button

Credentials

M365 Endpoint Administrator Associate
M365 Fundamentals
Microsoft AZ-900
CompTIA CSIS
CompTIA CIOS
CompTIA Security+
CompTIA Network+
CompTIA A+
  • April 2025
  • December 2024
  • November 2024
  • October 2024
  • September 2024
  • August 2024
  • May 2024
  • April 2024
  • March 2024
  • February 2024
  • January 2024
  • December 2023
  • November 2023
  • October 2023
  • September 2023
  • August 2023
  • July 2023
  • June 2023
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • January 2023
  • December 2022
  • November 2022
  • October 2022
  • September 2022
  • August 2022
© 2022 Payton Flint | The views and opinions expressed on this website belong solely to the author/owner and do not represent the perspectives of any individuals, institutions, or organizations, whether affiliated personally or professionally, unless explicitly stated otherwise. The content and products on this website are provided as-is with no warranties or guaranties, are for informational/demonstrative purposes only, do not constitute professional advice, and are not to be used maliciously. The author/owner is not responsible for any consequences arising from actions taken based on information provided on this website, nor from the use/misuse of products from this site. All trademarks are the property of their respective owners.