Articles

PowerShell articles, tutorials, and guides from community experts.

pscookiemonster
PowerShell for Admins

Finding Evil LDAP Queries

Have you ever wondered what LDAP queries were hitting your domain controllers? Even outside of fun investigations, it can be insightful to get a sampling of queries hitting your domain controller. The more services you have integrated with Active Directory, the more likely a vendor or sysadmin unwittingly configured their service to produce evil queries. Mark Morowczynski from Microsoft wrote a great post on finding these expensive, inefficient, or long running queries - But something was missing.

Don Jones
Scripting Games

2015-October Scripting Games Puzzle

Our October 2015 puzzle might take us beyond the realm of one-liners, but it circles back to the August 2015 theme of retrieving information from the web. This is another scenario that actually has a lot of real-world applications, in that there’s a lot of practical uses in the work environment for this technique. 

Steve Parankewich
PowerShell for Admins

Delete Specific E-Mail or E-Mails From All Exchange Mailboxes

Well this is week number two in my quest to post an article once a week and I am back with a common request for Exchange administrators. There are a lot of scenarios that bring up a need to remove an e-mail or e-mails from all mailboxes in your environment. Perhaps there was a disgruntled employee, a virus outbreak, or a reply all to the whole company. We all know that the “Retract” button is best effort (yes I still miss GroupWise for that purpose).

David Jones
Tools

Convert ISO and WIM to VHD with a module

Convert-WindowsImage.ps1 is a very popular method to create VHD’s with. However it’s not a module, and in it’s current form cant be added to one. So I have started a new project on GitHub called WindowsImageTools and posted the results to the PowerShell Gallery. It has a few functions so far. Convert-Wim2Vhd, to do the work, and New-UnattendXml because it hate having to edit XML to make minor changes. The resulting XML is universal in that it works on both 32 and 64 bit and will do a silent install (currently on Volume Media only).

Stephen Owen
PowerShell for Admins

How to handle oAuth from PowerShell

One of the coolest features of PowerShell is the many tools we have available to work with services on the web, be they SOAP, REST, RPC or even WSDL services. It’s no question, PowerShell makes it very easy to pull down data from any of these places. Unfortunately, getting data from a service isn’t always as easy as embedding your credentials in a URL. In fact, some services require us to authenticate and ask the user for permission before giving up the goods.

Steve Parankewich
PowerShell for Admins

Automate enabling and disabling Lync / Skype for Business users

Hello PowerShell.org community, This is my first post here at PowerShell.org, and I have a goal of posting tips, tricks, articles, and solutions once a week. My first exposure to scripting was on my x486 computer. I would always create .bat files to launch my DOS based games from the root folder. I learned complex scripting through the use of VB Script, automating the roll out and updating of Windows 2000 desktops and servers.

Mike Roberts
PowerShell for Admins

PowerShell Scheduled Jobs and Tableau analytics

Here’s a brief rundown of how we leverage a few Cmdlets from the PSScheduledJob module to manage our Analytics stack. For those of us on the Analytics team at Pluralsight , PowerShell is the lynch-pin which binds our two worlds together. To manage the gaps inherent in all platforms (since one tool would be hard-pressed to cover all areas), we use PowerShell to link the worlds of Data and Analytics (and back).

Jonas Sommer Nielsen
PowerShell for Admins

Take home from PowerShell Summit Europe

WOOHA it’s been a great week. I sat down last night my brain all fried and tried to compile a list of things to remember from the past week. There is much focus on “changing the mindset” of the community. Get into the DevOps mindset and become a toolmakers. This is my take-home from the conference. There’s no way to summarize all of the conference other than to say: Look forward to the videos on YouTube.

Don Jones
PowerShell Summit

Speaking at PowerShell Summit 2016: Topic Ideas for Aspiring Speakers

Our call for topics for PowerShell and DevOps Global Summit 2016 is open until November 1st, and I thought I’d share some ideas for the kind of 400-level content we’re looking for. First, to submit abstracts, pre-register as a speaker candidate. Be sure to fill in the brief demographic information presented, and then add any information for the Attendee Directory that you’d like. When you’re done with that, select Abstracts from the menu at the tippy-top of the page, and enter your session information.

Matt Laird
PowerShell for Admins

Store Secured Password in PowerShell Script

Automation is awesome, but what if you need to run a script with elevated privileges? If you are following security best practices then the account you login with most likely doesn’t have the required elevated privileges. Storing your password in plain text in your scripts is no good either. So what do we do? There are several options and each has there place, but I’ll show you my favorite below. Check out the full article by clicking on the link below.