Monthly Archive

Categories

PowerShell

Conference–time to book

Registration is open for the PowerShell Summit (USA) and PowerShell Conference (Europe). Now is an excellent time to decide which one you’re going to attend next year. If you’re serious about PowerSHell you should be at one of these events.

 

PowerShell Summit - https://eventloom.com/event/home/summit2017

 

PowerShell Conference - http://www.psconf.eu/

PowerShell finally the de facto shell

After 10 years PowerShell has become the de facto shell for Windows!

 

Windows Insider Preview build 14971 released yesterday uses PowerShell instead of cmd.exe as the default shell in Start Menu or File Explorer.

 

See https://blogs.windows.com/windowsexperience/2016/11/17/announcing-windows-10-insider-preview-build-14971-for-pc/#66Smq5KicvsTBzld.97

for this and other new features

New PowerShell console on Server Core

Server Core is great for reducing the footprint of your VMs – Nano server is smaller but it can’t be a domain controller

 

One draw back to server core is that you only get a single console. If you hang that for any reason you have to either try and open another one (Hyper-V console greys out CTRL-DEL-ALT) or open a few when you logon to the machine.

 

You still get a cmd.exe console instead of PowerShell – that should be changed. Its 10 years since PowerShell came along! So run Powershell to open  Powershell in the default console.

 

"Start-Process -FilePath powershell.exe -Verb RunAS" > new-powershell.ps1

Will create a simple script to open a new elevated Powershell console .

 

Run it as many times as you want. Perform your work in the new Powershell console and if it hangs – just shut it down. Keep the default console for just opening new PowerShell consoles and then you’ll always be able to keep working.

Exploring PowerShell automation

My PowerShell books have all been published by Manning, A while back they asked me to put together a selection of extracts that show the depth and breadth of PowerShell. Its now available – for free - https://www.manning.com/books/exploring-powershell-automation

 

The book highlights PowerShell remoting and administering SQL Server, IIS and Active Directory through PowerShell. These are core skills these days and the book will give you a good introduction to these areas

PowerShell 10 year anniversary videos

Yesterday was the PowerShell 10 year anniversary event – broadcast live on channel 9

The session recordings are available

https://channel9.msdn.com/Events/PowerShell-Team/PowerShell-10-Year-Anniversary?sort=status&direction=desc

Don’t reinvent the wheel

Way back when I used to take Microsoft certification exams there were often questions of the form “Perform task X with the minimum of administrative effort” Most, if nor all, of the possible answers would be correct but the correct answer was the one that achieved the goal with the minimum amount of work.

 

Many, if not most, administrators don’t seem to follow that model.

 

This was brought home to me when I saw a forum discussion about collecting event log information from a bunch of remote servers on a regular basis.

 

You could set up a scheduled task/job that runs a script against the remote servers – collects the  log information and populates an Excel spreadsheet

OR

You could enable event log forwarding and just interrogate the combined logs as needed.

 

The second option is the easier to MAINTAIN and will cost you less effort in the long run.

 

When you start to solve a problem – stop and search for a bit to see if there is a solution already available in Windows server. Bet you’ll be surprised by what you find

Start and end dates

Be careful with start and end dates when search for files or through event logs.  Often people want to see what happened yesterday

If you do this

PS> $end =  Get-Date
PS> $start = (Get-Date).AddDays(-1)
PS> $start

30 October 2016 16:32:35

PS> $end

31 October 2016 16:32:16

And you get the last 24 hours

 

if you really want just yesterday you need to create the exact dates and times

PS> $start = Get-Date -Day 30 -Month 10 -Year 2016 -Hour 00 -Minute 00 -Second 00
PS> $end = Get-Date -Day 31 -Month 10 -Year 2016 -Hour 00 -Minute 00 -Second 00
PS> $start

30 October 2016 00:00:00

PS> $end

31 October 2016 00:00:00

 

I know there are easier ways but using Get-Date shows exactly what’s happening and is simple

Registration opens 1 November

Registration for the 2017 PowerShell Summit opens tomorrow – 1 November 2016

 

First come first served. The agenda and registration are available here - https://eventloom.com/event/home/summit2017

PowerShell and DevOps Global Summit 2017 agenda

The agenda for next year's Summit is almost complete - we've notified all speakers as to whether their sessions have been accepted or not. If you haven't received your notification please check your spam/junk mail.

 

We have a small number of sessions yet to publish - mainly around possible focus groups on the Wednesday afternoon.

 

To view the agenda go to the Summit event site - from https://powershell.org/summit/ click on the Brochure and registration link.

 

Registration opens 1 November 2016.

PowerShell 10th Anniversary

If you were in the audience at the 2006 Microsoft European TechEd (or IT Forum or whatever they called it that year) key note presentation you’ll know that 14 November 2016 is the 10th anniversary of PowerShell.

 

The Powershell team is presenting a day long event on 14th November to commemorate the anniversary.

 

Initial announcement is here https://blogs.msdn.microsoft.com/powershell/2016/10/24/join-the-powershell-10th-anniversary-celebration/

 

More details to follow