Articles

PowerShell articles, tutorials, and guides from community experts.

Don Jones
Announcements

Win a Free 4-Day Pass to PowerShell and DevOps Summit 2016!

Want to attend the newly expanded, 4-day PowerShell and DevOps Summit coming to Bellevue, WA in April 2016? Well you can - if you make your own community contribution! Our TechLetter newsletter is looking for articles. And, November is of course NaNoWriMo, the National Novel Writing Month. But we aren’t looking for a novel - just newsletter articles! So we’ll call it National PowerShell and DevOps Article Writing Month (NaPoshDoArWriMo). Er.

Steve Parankewich
PowerShell for Admins

Find any E-Mail Address or Proxy Address In Active Directory

I am back this week with some more Exchange and Unified Communications goodness. This is another request I see a lot, someone want’s to know where an e-mail address is assigned. This opens up the possibilities of user mailboxes, shared mailboxes, distribution lists, public folders, conference rooms, contacts or resources. I have also seen duplicate e-mail addresses being assigned outside of Exchange causing delivery failures. I take a look at how you can quickly find any e-mail address in your environment along with partial searches of e-mail addresses.

Carlo Mancini
PowerShell for Developers

The JAPE challenge

I have wanted to write my very own obfuscated e-mail signature for a long time but kept myself from doing it. At the time I thought of all these lines of obfuscated code that people wrote during competitions such as the International Obfuscated C Code Contest (IOCCC) or the Obfuscated Perl Contest as beyond interest. Then I started competing in the Scripting Games, and some tasks involved writing Powershell oneliners that required mastering the use of the pipeline as a tool to refine what each cmdlet passed to another.

nohwnd
PowerShell for Admins

Command and query separation in Pester tests

Do you feel that writing tests is confusing, and you often end up with complicated test code? I did too, before I learned about Command-query separation principle (or CQS). This principle lead me to start thinking about data flow directions in tests and in the end I realized there are few basic patterns that I use in my test code over and over. Command-query separation principle The command and query separation principle tells us that we should separate commands from queries (duh!

Will Anderson
PowerShell for Admins

Desired State Configuration – Beware Of Circular Configurations

Lately, I’ve been working at converting a lot of my server configuration scripts into DSC configurations. After all, what better way to learn than by updating your existing methods? I recently ran into an issue, however, while converting my SCCM Distribution Point deployment script into a config, where the test systems inexplicably began rebooting every thirty minutes or so. The Local Configuration Manager was configured to reboot if necessary, and these were fresh installs, so I knew that my culprit was most likely in my configuration.

Timothy Warner
PowerShell for Admins

Using Package Management in Windows PowerShell v3

Hey now! The PowerShell team published a preview version of PackageManagement for Windows PowerShell v3 and v4. As it happens, I have a Windows 7 SP1 box running PowerShell v3–why not run a little experiment? `$PSVersionTable.PSVersion Major Minor Build Revision 3 0 -1 -1 `## Preparing the Environment You need .NET Framework 4.5 or later, so take care of that prerequisite before you install the following two assets: Windows Management Framework (WMF) v3 PackageManagement PowerShell Modules Preview I restarted the computer after each installation just to be safe.

Steve Parankewich
PowerShell for Admins

Automate Sip Address and UPN name changes in Lync / Skype for Business

Name changes are a common occurrence in the world of IT and usually the primary concern is the e-mail address. Exchange e-mail address policies will handle this for us but often times the Sip Address and User Principal Name are left behind. I tackle these changes with an automated way of changing the Lync / Skype for Business sip address (also known as sign-in address) and User Principal Name to match the e-mail address.

Steve Parankewich
PowerShell for Admins

Export Subnets from Active Directory Sites and Services

I am back this week with a quick write up on how to export your network subnets from Active Directory Sites and Services. Active Directory Sites and Services subnet assignments are important for healthy replication and for location based services to function properly. The need for this information has come across my desk on several occasions. Even a quick print out would be extremely helpful to keep at your desk. I have included both Windows 7/2008 and Windows 8/2012 methods to ensure everyone is covered.

Timothy Warner
PowerShell for Admins

Testing PowerShell Direct with Windows Server 2016 TP3 Hyper-V

Hey there! I thought we could test PowerShell Direct together today. Here’s the elevator pitch: In Windows Server 2016 and Windows 10, we can send PowerShell commands from the Hyper-V host directly to its corresponding virtual machines (VMs), even in the absence of guest VM networking. Yeah, that’s cool, isn’t it? What’s just as impressive is that PowerShell Direct works _even if PowerShell remoting is disabled on the guest VM! _PowerShell Direct also circumvents Windows Firewall.

Mike F Robbins

#MSPSUG Virtual Meeting: Using Regular Expressions with #PowerShell – October 13th 2015

Join the Mississippi PowerShell User Group virtually on Tuesday, October 13th at 8:30pm Central Time when Timothy Warner will present “Pattern Match Like a Pro: Using Regular Expressions with Windows PowerShell”. Many Windows systems administrators are intimidated with regular expressions due to its seemingly strange, “Unixy” syntax. Take heart! By the end of this session, you’ll finally understand how to perform simple and advanced text filtering with RegEx, specifically by leveragine PowerShell’s -match operator and Select-String cmdlet.