Author Archives: Jason Helmick

About Jason Helmick

Jason is a 25-year IT veteran and Senior Technologist at Concentrated Technology. He’s an avid supporter of the PowerShell community as board member and CFO of PowerShell.Org. He is the author of “Learn Windows IIS in a Month of Lunches” and contributing author to “PowerShell Deep Dives”, along with a columnist for TechNet Magazine and many other industry publications. He’s a frequent speaker at many conferences and can be contacted on Twitter: @theJasonHelmick

New tools in my toolbox!


Much like a top mechanic, I keep a well-organized toolbox filled with up-to-date, high quality tools, ready to tackle any management, troubleshooting or automation project of the day. With the recent release of SAPIEN Technologies new 2014 lineup, I have some new tools and updates.

Wanna’ see what’s in my toolbox? I’m happy to show you around on one condition. I’m interested in what you have in your toolbox, so share and we can discuss!

As an admin working heavily with products such as Microsoft Exchange, Exchange Online, System Center and others, I find that I need many different tools depending on the management task at hand. My Windows 8.1 desktop has everything neatly arranged on the taskbar so the right tool is always a click away, but I also have my own secret aliases to launch a variety of my tools from the Windows PowerShell Console – including Microsoft Word just in case I feel the urge to write a blog about something new I’ve learned. So, here are some of the tools in my toolbox and how I use them.

Windows PowerShell Console

I have friends, colleagues, and several students that laugh when I open the Windows PowerShell Console to launch my browser. I admit that placing a shortcut on my desktop or taskbar is probably a better approach, however I’m almost always in the Console. I have the Console open to “check” on things, run reports, manage or troubleshoot a problem, basically using the Console as the interactive tool it was designed to be. I can easily get help on a cmdlet, launch additional tools, and run my scripts. So, when you see me open the Console and type:

PS> Start iexplore www.bing.com

It’s “ok” to laugh, it’s the habit of always having the Console open and at my fingertips. But the Console is not the only tool in my toolbox. I need to automate and build reusable solutions and the console just isn’t the place for that.

Notepad

Yes, I use Notepad from time to time. Normally it’s for something simple and short, like modifying my profile or quickly copying a one-liner from the Console. For me, this is an old habit from years of scripting when I would walked up to computer and there was nothing else installed. Many of us that started out with PowerShell 1.0 continued to hone the “Notepad” skills. For new admins starting with PowerShell, Notepad is probably not something you need in your toolbox; we have the built-in ISE now and makes Notepad look like an old rusty screwdriver.

Windows PowerShell ISE

Let’s face it, the ISE is great and I use it all the time. Syntax highlighting, a GUI Console with easy-to-use cut and paste operations to make a new script, who wouldn’t use this over Notepad. The ISE is a great tool for working out an idea, learning and creating a new one-liner, building a function or writing out some automation.  Everyone needs this as part of their toolbox.

But wait…there’s more…

My toolbox doesn’t stop with the ISE. Many of my projects require working on Modules of cmdlets, longer and more complicated automation scripts and sometimes I need more features (like package and deployment) that the ISE doesn’t provide.  Does this make the ISE bad? NO! The ISE is great for what it is designed to do, that’s why I have a toolbox of many tools and not just a hammer.

Many of my friends are professional developers and rely on professional development packages like Microsoft Visual Studio and Apple Xcode. The reason for them is the added tools and features that help them accomplish their tasks. As a PowerShell Admin working on more and more complicated solutions, I too need additional tools.  While I may not need Visual Studio yet, I could use the help from a professional development package.

SAPIEN PrimalScript 2014

Disclaimer: I’ve used PrimalScript for a very long time and I admit I’m a fan of SAPIEN Technologies. They have earned my respect over the years by providing me with high quality tools that make my life easier. It’s that simple.  PrimalScript has 50 different parsing languages – so no matter if it’s a PowerShell script, Perl, AutoIt or Java, I’m equipped. You might not need to work with a variety of different languages but there is much more to this product that may fit your needs such as easy to use script signing, creating .exe’s and packaging tools.

I’ve been using the new release version and I personally think that SAPIEN has hit the mark once again. The cost is much cheaper than Visual Studio and the tools are designed for many administrative tasks, which means it fits for me. I could spend pages explaining why I use PrimalScript, but is it right for you? I don’t know – that’s why you should check out the webpage and see. Remember, if you decide to try out the evaluation version, let me know what you think and if you decide to add it to your toolbox.

SAPIEN PowerShell Studio 2014

From time to time I’ve found myself in need to create a graphical tool to help support an admin or helpdesk. Often these are simple graphical tools, manipulating some user properties of a mailbox or in Active Directory. While I encourage helpdesk folks to learn PowerShell, let’s face it, it’s just much easier for them in most cases to use a graphical tool. This is why PowerShell Studio is in my toolbox. It’s really like having the great graphical creation tools from Visual Studio in an affordable development environment using PowerShell.

Again, this may or may not be a business challenge you face, so take a look at the website for more information and take the evaluation out for a spin. If the only language you will need at your office is PowerShell, then this might be the perfect tool for you. I’m curious so let me know.

The Glue in my toolbox – SAPIEN VersionRecall 2014

I’ve written here in the past about VersionRecall, a quick, simple version control program that keeps versions of your scripts for easy comparison and recovery. I don’t have the hardware/software for Microsoft Team Foundation Server, and I really don’t need those features that TFS provides. It’s a great product and if you have TFS, or something like it, then you already have your solution, but I always wanted something that could provide automatic version control that was super simple and easy to use. That’s why it’s the glue in my toolbox, keeping all my scripts versioned and backed up, so the next time I’m wondering what change did I make that broke my function, I can easily make a comparison.

Again, you can always try it out for yourself on their website.

Microsoft Visual Studio

This tool is in my toolbox for entirely different reasons then the others; education. When students or colleagues notice I have Visual Studio, they usually ask if I’m a developer. Well, to get better at automation with PowerShell, I’m becoming one. No, I’m not leaving PowerShell for the lands of C# – it’s simply that I’m learning more about the development process, skills, and deeper knowledge to help improve my abilities. These improvements directly impact my job capabilities, so the investment in Visual Studio has been worth it.

I do want to mention, that if you are a developer that wants to work with PowerShell and you have Visual Studio – which I’m sure you do – check out PowerShell MVP Adam Driscoll’s PowerShell Tools for Visual Studio.  I have them loaded into my copy of VS and I really like what he has done.  You might find it helpful, so check out his page here. 

Closing my toolbox

So that’s the short tour of my toolbox and how I use the tools inside. So, what’s in your toolbox? What do you like to have at your fingertips? We all have slightly different jobs with different requirements, but the discussion can help us learn from each other. There is no right or wrong answer!

Cheers!

Jason

The N.A. 2014 PowerShell Summit Agenda is released!


Have you been wondering what the agenda for the N.A. 2014 PowerShell Summit was going to be? Been waiting to purchase that golden ticket? The wait is over!  We now have the complete agenda, speakers and titles for the PowerShell Summit NA 2013. Make sure to check the PowerShell Summit Agenda page for updates and a full agenda with session abstracts! You certainly don’t want to miss any of the special events!

We would like to thank all speakers that sent in abstracts for the summit. We wanted to have all of you!

Refer to the official page for the latest agenda information.

Speaker agreements for the N.A. PowerShell Summit have been sent!


Before Don pokes his head in to the secret list and starts leaking names again, we will be officially announcing the speaker lineup and agenda as soon as we receive signed agreements back.

We were overwhelmed with session titles and abstracts, many more than we anticipated – thank you ALL for actively participating and offering to speak at the PowerShell summit. I think when you see the final list, you will find a great balance of Microsoft Team members, MVP’s, Guru’s and non-MVP’s – all joining together for a great PowerShell summit.

Make sure to follow the latest news and information about the summit both here and on Twitter: #PSHSummit

If you didn’t get selected:

It’s not because we didn’t want to have you. The selection committee had a very hard time – spending days and sometimes several hours into the late night (ok, at a bar) attempting to determine the best sessions for the largest audience. This was a very difficult task as all of you sent in great session ideas.

If you did submit a session but have not received a speaking agreement, we may still call upon you to speak. Over the next couple of weeks, if there are selected speakers that can’t make it to the summit, we have you on a waiting list and will contact you.

If you have been selected:

We have a small collection of specially priced hotel rooms for the speakers that are providing 2 or more sessions. If you only have one session listed on your agreement, we may have a few of these hotel rooms still available. We won’t know for a week or so, but if we do, you can purchase a hotel room at the same discount that PowerShell.Org is paying. There won’t be many left, so when we send you an email, respond fast and I’ll call you to get credit card information.

So, any names you will leak?

No – not till we have signed agreements – and I’m keeping those safely hidden from Don.

When will you post the Agenda?

We are trying to get the agenda posted by November 1st, but it may take a few extra days to receive all the agreements. Keep checking here and #PSHSummit for the latest news.

Planning on attending the North American PowerShell Summit?

You might want to start getting your tickets now before the holiday rush. Last year we sold out before Christmas and many people didn’t get to come. We have a slightly larger capacity this year, but don’t wait till the last minute. That reminds me – I have to get my ticket too.

See you at the North American PowerShell Summit!

Jason

 

My review of Microsoft Exchange 2013 PowerShell Cookbook


We all agree that PowerShell is an amazing real-time and automation management tool. While many of us focus on the in-depth workings of our favorite tool, the real test is in its everyday use managing the products we are responsible for – Exchange being one of mine.

Many of you already know that the Exchange team invested heavily with implementing PowerShell starting with Exchange 2007. This was an enormous risk considering that most admins would not begin adoption of PowerShell for a few more years. The maturity of the cmdlet implementation – the ability to perform every task with the cmdlets – was, and still is, one of the finest product implementations of PowerShell. The Exchange team has continued its amazing implementation with Exchange 2010 and 2013. But with this amazing implementation comes a cost: Learning PowerShell for Exchange.

The best resource – and for a while the only one – that helped with learning the Exchange cmdlets and specific automation tasks was a book written by Mike Pfeiffer called “Microsoft Exchange 2010 PowerShell Cookbook”. It was an amazing resource of common – and not so common – tasks that every admin would need to perform – but described with the PowerShell cmdlets for Exchange. It was well written with great explanations and helped me get up to speed fast working with Exchange 2010.

Now there is a new release, a second edition by Mike Pfeiffer and his co-author Jonas Andersson titled “Microsoft Exchange Server 2013 PowerShell Cookbook“.  Since I’m moving on to Exchange 2013 I thought I would give the book a try at helping me get prepared.

Exhanch

Success! Again, the second addition is very well written and crammed with everything you need to know on managing Exchange with PowerShell. It’s a cookbook, so this isn’t something you read from cover-to-cover, you jump into the task that you need and get immediate help solving your problem. I did read it from cover-to-cover (I’m a geek) and found the book very logically laid out. Beginning with a short PowerShell introduction the book moves quickly into managing mailbox’s, recipients and databases.  Why use GUI tools when PowerShell can make this so easy.

The book goes into detail about specific management and configuration tasks for managing client access and the transport service, but where the book shines for me is in the sections on High Availability and monitoring/troubleshooting.

Towards the end of the book there is a great section on scripting automation and solutions using the Exchange Web Service Managed API – which opened up a whole new way for me to create solutions.

If your working with Exchange 2010 or 2013, this cookbook series is a must have. I have them both and they never leave my desk.

Here’s that link again if you want to check them out for yourself!

http://bit.ly/10mKM9D

Knowledge is PowerShell,

Jason

 

 

 

MVA PowerShell Jumpstart 2 Scripts for Aug 1st.


If you are joining Distinguished Engineer Jeffrey Snover and Myself for the second PowerShell Jumpstart http://aka.ms/AdvPwShl – then grab these scripts if you want to follow along.

These are learning scripts that will be used throughout the presentation for demonstration purposes.

MVA Jumpstart 2 Scripts

See ya Aug 1st!

Jason

But wait – there’s more! Scripting and Toolmaking on Aug 1st.


Microsoft Virtual Academy will be broadcasting a live presentation of PowerShell scripting and toolmaking. In this presentation, Distinguished Engineer Jeffrey Snover and Senior Technologist Jason Helmick will get you started turning your automation scripts into reusable tools that look and feel just like cmdlet’s.

This fast paced presentation will be loaded with best practices and guidelines for making Advanced Functions and building modules that can be shared with your entire administrative team. Start building your own solutions for your custom business needs and let PowerShell take you to the next level.

You don’t want to miss this!

Full Page Link: http://www.microsoftvirtualacademy.com/liveevents/Adv-PowerShell-Jump-Start?CR_CC=200226341

Short Link: http://aka.ms/AdvPwShl

Cheers!

Jason

A special presentation on getting started with PowerShell


Microsoft will be broadcasting a live special presentation – one that can’t be missed by anyone learning and using PowerShell. In fact, they will be broadcasting two events, which I will explain – but here is why you can’t miss them.

  1. On July 18th in a live broadcast – The inventor of PowerShell, Distinguished Engineer Jeffrey Snover, along with myself, will be taking you through the ins-and-outs of using PowerShell for real-time problem solutions and automation.
  2. There will be a second presentation in August going further into scripting, automation and building tools (cmdlets) – solutions to hand to other admins, helping them to solve problems.
  3. It will be the most fun way to spend the day and learn more about PowerShell then you thought possible.

This is a great time to get your IT staff together and learn PowerShell. Even if you already know how to use PowerShell – why not get the rest of your friends involved? This will be a high speed for IT Pro only presentation. Yes, it will be recorded, but you really want to show up in the live broadcast so you can ask questions directly to Jeffrey, the inventor of PowerShell.

Jeffrey and I have crafted a great presentation for you – you can’t miss this!

(For me this is a great honor to sit across from the master, and you certainly don’t want to miss the possibility of me screwing up!  Here are the details:)

Getting Started with PowerShell 3.0

July 18, 2013

9:00am – 5:00pm (PDT)

http://www.microsoftvirtualacademy.com/liveevents/PowerShell-JumpStart

As a side note:

I’ve been honored to teach PowerShell to hundreds of Admins over the last couple of years using Don Jones’ book “Learn Windows PowerShell in a Month of Lunches” – both versions 2 and 3 – published by Manning Publications (www.manning.com). He and Jeff Hicks updated it to version 3 and I’m sure they will also update it to version 4. I also have been teaching a variety of versions of Don’s “Toolmaking,” now published as “Learn PowerShell Toolmaking in a Month of Lunches” (from the same publisher) by Don and Jeff Hicks.

The success rate for admins learning PowerShell, learning how to solve problems, then automating and building tools (cmdlets) has been astounding. Working with Don on these topics and classes has been one of the highlights of my career.

Don also wrote the Microsoft Official Curriculum (MOC) for PowerShell (course 10961) based on his (and Jeff’s) first “Lunches” book. I again was honored to be able to teach the first beta class, and the students left the class with an amazing ability to really use PowerShell to solve their everyday business problems.

It’s now a career dream to be able to deliver this same information – very fast-paced and specifically for the IT Pro – in a video series with the inventor of PowerShell, Distinguished Engineer Jeffrey Snover. In two events (each consisting of a full day) Jeffrey and I will take you through everything you need to know to be immediately effective (that’s one of Don’s signature design goals) with PowerShell, both in real-time and in building tools (cmdlets) for other admins.

You don’t want to miss this!

Knowledge is PowerShell,

Jason

Maintaining scripts and version control


So, here is a problem that has started affecting Admins working with PowerShell. It’s a problem that Developers have solved for years, and expert PowerShell automation/toolmakers have followed suit. For the newer scripter a problem you’re going to start to have is maintaining scripts over time – especially after months of changes.

Imagine maintaining a module or script, making a change or adding a new function – everything seems to work fine, then two months later someone says – “Hey that script doesn’t work anymore!”  Oh my god, what change did I make last March 3rd – I have no idea.

Version control is the ability to rollback or compare your current version with an older one so you can see and examine the changes that have been made over time. Developers can use products like Microsoft’s Team Foundation Server, but this is a complicated implementation if you don’t already have it. Many PowerShell experts also use DropBox or Git – also that have limited features and require some manual work.

There is a product that I use that I wanted to let everyone know about – and right now it’s free. It takes all the “thinking” out of the process and doesn’t require you to install infrastructure services, database, SharePoint and other tools.

I’m not trying to sell this product – it’s just the one I use – so if you already have something you like – don’t bother yelling at me. But I do want to open up a conversation about version control – what do you use? Do you need it? What are some ideas?

Here is a video of the one I use – check it out if you want – and please share your thoughts!!!

http://youtu.be/VYZZrMQ5Seo

Comments?

 

Knowledge is PowerShell,

 

Jason

 

@theJasonHelmick

Need something to read while on vacation?


Here is something to do while sitting by the beach this summer – try out a new PowerShell book. Go ahead and take it for a spin. I haven’t read mine yet, so reviews are welcome and encouraged!  Here are the details:

Packt Publishing are offering free copies of  Windows Server 2012 Automation with PowerShell Cookbook : http://www.packtpub.com/windows-server-2012-automation-with-powershell/book in exchange for a review either on your blog or on the title’s Amazon page.

  • Streamline routine administration processes
  • Automate the implementation of entire AD infrastructures
  • Generate automatic reports that highlight unexpected changes in your environment
  • Monitor performance and report on system utilization in detailed graphs and analysis
  • Create and manage a reliable and redundant Hyper-V environment
  • Utilize the Best Practices Analyzer from Microsoft to ensure your environment is configured optimally
  • Manage the patch level of your enterprise
  • Utilize multiple protocols to share information in a heterogeneous environment

If you’re a Powershell user or interested in getting to grips with it, this is a good way to bag yourself a free guide (current retail price £28).

If you’re interested, email Harleen Kaur Bagga at: [email protected]

 

Jason

Flash: MVP Systems webinar “Power Scheduling with PowerShell & JAMS”


On June 26 MVP Systems is hosting a free webinar on JAMS and PowerShell called “Power Scheduling with PowerShell & JAMS”. You won’t want to miss this, so get it on your calendar!

The following topics will be covered:

  • Enforce Enterprise Class Security and Version Control on PowerShell Scripts.
  • Permit others to execute PowerShell scripts securely.
  • Manage scheduled jobs with PowerShell cmdlets
  • Set a job trigger with PowerShell
  • Use PowerShell across multiple platforms.

Here’s the full link:

http://jamsscheduler.com/register/FreeWebinarPowerShellSched.aspx?DATE=6/26/13&TIME=1pm

Judge Notes: Event 1 – and Thank you for participating!


It’s amazing to see all the participants this year joining in the Scripting Games. I have so much respect for everyone willing to share their ideas and contribute to the games -  Thank you! – it takes a lot of guts to put your ideas in front of everyone and be judged. You ARE helping the entire community – You DO have my respect.

I want to start this first blog entry with my perspective and offer a little help along the way. Some of the things I’ve seen have really impressed me – I’ve even learned a few new tricks – and some things I’m seeing should not be happening. I’ll focus on the beginners challenge for Dr. Scripto in this blog.

Many folks attempted to solve this problem in a one-liner. There is nothing wrong with that, but I noticed many people going through some pretty chewing code to make the one-liner work. Don’t be afraid to make a script if your nesting Foreach-Object inside Foreach-Object. ;)

A couple of gottacha’s –

  • Make sure you understand the capabilities of the cmdlet’s that you’re using. It can make your solution easier to write, easier to read, and just plain easier. I saw a lot of folks using Get-Childitem twice like this:

get-childitem C:\Application\Log -directory | get-childitem -name “*.log”|

Many folks did three one-liners, one for each folder. Get-Childitem can make this easier with the –recurse parameter.

 Get-ChildItem -Path C:\Application\Log -filter *.LOG -recurse |

  • Careful with those aliases my friend. I know that many people posted the code as if they were sitting at a console and solving the problem. In interactive mode, you often use alias’s to make the typing shorter – and if you posted a one-liner that used aliases, I forgave you for that. But if you posted a full script and used aliases – gottacha. In other words, when you script, try to be as verbose as you can. It makes readability easier and future maintainability far easier. As an example, I saw a lot of this:

Gci c:\application\log –filter *.log –recurse | ?{something} |%{something}

I don’t know about you, but this is not easy for someone else to read and should not be in a script. Tab completion makes is fairly easy for you to keep things readable without a lot of additional typing.

Get-ChildItem –Path c:\application\log –Filter *.log –Recurse | Where-Object{something} | Foreach-Object{something}

  • And my last tip for this blog? I can’t believe I’m still seeing this after all these years – and maybe I’m overly sensitive to it – but please stop using WRITE_HOST!

Try Write-Output instead, or if you want to just document your code, how about Write-Verbose. If you want to warn the user, then Write-Warning. All of these are far better, more flexible, and less problematic going forward. Please, no more scripts with write-host. I have a tendency to just ignore your solution and vote down your script.

Again, to everyone – thank you for having the courage to participate and join the fun in the Scripting Games. We all (myself included) learn so much from this!

Knowledge is PowerShell,

Jason