Loading...

Welcome to WordPress. This is your first post. Edit or delete it, then start writing!

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

In our lives a page turns to a new chapter.  Sometimes good, sometimes bad and in many times unexpected.

Four months ago a chapter in my life ended.  My Dad passed on during MVP Summit.

I cried like we all would at such a time, found the comfort in friends and reached out to my hero that passed away so say Goodbye.

I was blessed with the opportunity that before the last day happened I got to say to my Dad farewell.  I rememeber it well.

“…I’m so glad you were my Dad.  I Love You.” (the tears poured our in the midst of Summit unbeknownst to the many around me.)  MVP’s were around me during a break as my eyes stared at the window in disbelief.  “Dad won’t be here for more than 2 weeks….” a glistening of by eyes stared back at me from the window in Redmond.

The next day Dad finally rested, no more pain and before he left gave me a gift of an online posting.

“Microsoft PFE – Ottawa”.  I lived there, wanted the job but still was afraid to try.  Cistel, my current employer treated me so well.  We were like family.  The owner Nishith came by regulary to say Hello to everyone.  Vineet and Ron would pop by with Donuts or a pat on the back Fridays.  Colin my boss felt so much like a friend (because he was like the rest of my team and co-workers) that I didn’t want to win and walk away.

I was so afraid to apply.  I was here in a  Happy place in a good job but my heart said I wanted to give it a shot. 

I kept hearing Dad say “You want this?  Give it a shot!  If you succeed you’ll find the answer no matter the location.  You have everyone’s support.”

So I did.  Applied.  Pinged a Manager.   Went through the interviews.  Succeeded.   What an amazing  Birthday present!

I need to blink twice at this statement.  “Succeeded!”

As of this posting I am officially a full Fledged Blue Badge at Microsoft Canada.  A Premier Field Engineer. 

Many would say “I DID IT!” and I did.   But I had help.

I had my long time friend Rick from Around the Clock I.T. Solutions Inc who cut me that first big field break.  Working with Doctors, Lawyers and Professionals.  Testing my skills and finding eventually I could do things I didn’t imagine building my confidence.

I had friends at Microsoft Canada that I met after all of those Free Technet sessions in Mississauga.  People that encouraged me to be me and did so in the form of having me test my Creative bits as a “Friday Funny Guy” (Thanks to the former and current members, all of them of Microsoft Canada DPE “DX team”). My first big break of encouragement was their publishing this lone email online on the www.canitpro.ca website.

There was a also a voice of guidance, a Master who helped me understand and work on my Professionalism.  A Man who changed so many lives especially this one. The best MCT, former MVP and field expert out there.  Mitch Garvis.    If you have been touched by him, you will understand.  If you have not, I hope you do someday.    Mitch managed to focus that “Friday Funny Guy”.  

For you Mitch I am eternally grateful.   Words can never do you justice for all you have done.   

Eventually I would present at user groups, Conferences including The Experts Conference, Techdays and TechEd.   The opposite of that shy kid from High School that would not present even if an Army of Daleks stood at his back side screaming “Present Tonight! Present Tonight! Do it now or be EXTERMINATED!”

I also was blessed with the opportunity to know Ed “Hey Scripting Guy” Wilson of Microsoft and his wife Theresa “Scripting Wife”.   They helped me find the balance of “Me” and “Serious Me”.    (DUDE! It happened!)

Then there’s this massive community of MVP’s, PowerShell Community, people at Microsoft I consider friends.   I won’t name names at Microsoft but I am honored to here the many say “Woohoo!”

… most importantly Family.    the backbone which supported all of this.

My wife and kids who put up with all the offkey singing, the crazy ideas, the basement in Oshawa cluttered with every type of computer component possible.  Especially my wife.  Thank you Rose

My direct family who always encourage their crazy brother Sean to do his thing.

My Uncle and Aunt that watched this 16 year old kid disassemble a $4000 computer in 1981 and fix it…. and didn’t freak out.  Encouraging me all through life (Thanks Uncle Pat and Aunt Maureen)

Most importantly my Parents.   Mom and Dad thank you for on that fateful day, investing in a single Commodore Vic 20 for a future you foresaw but could not imagine.   I know you’re up there smiling down Dad.

I hope to make you all proud and succeed in ways I cannot imagine.   I hope to still be that “Friday Funny Guy”, “Honorary Scripting Guy” and “Former MVP” and “Professional”

Most of all, I can not wait to see where I am …. 5 years from now.

But as of March 1st 2017 I am …..

Sean Kearney
Premier Field Engineer
Microsoft Canada
“Honorary Scripting Guy”

….and maybe a future “Hey Scripting Guy!” team member? After all…. we all need to keep dreaming beyond our todays, who knows what tomorrow will bring. 

 

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

As has been my usual way of driving the world Bananas for the past 7 years I have two things I have done traditionally in the month of December

Write a series of Holiday Silliness in PowerShell for Hey Scripting Guy

Write a correspondingly badly sung tune for the series.

… thus we have for the 7th Annual Scripting Guys Holiday Special on www.scriptingguys.com

“Scripting Time is Here” – Lyrics and horrid video

Scripting Time is Here - Holiday Tune - Very Cheezy - YouTube

Scripting Time is Here
PowerShell so dear
Systems run, my work is done
My alerts are in the clear

Cmdlets everywhere
Manage all with care
PC, Mac and Linux too
Remoting Through and Through

The Days end calls to me
I search the Gallery
Modules there, and Scripts as well
And Github there to see

Scripting Time is Here
Happiness is clear
Deployment done with DSC
So simple as can be

Yappie nerds…
I just not sure I understand the meaning of scripting
What do you mean?
Well I mean, really who wants to go home on time?
What?  What are you yammering on about?
I always thought staying in the Office for 18 hours a day was cool
Are you pulling my leg?  Wouldn’t you rather be home, relaxing with Family?
You mean Stinky?
Who’s Stinky?
My Bunny Rabbit
You have a Bunny Rabbit called Stinky?
No, he just smells bad.  His name is Karl.
Fine, wouldn’t you rather be home with Karl the Bunny? Earlier?
Yeah.
Well that’s what Scripting is all about, Consistency and getting home Earlier to Karl the Bunny.
Oh well, I never thought of it that way

The Days end calls to me
I search the Gallery
Modules there, and Scripts as well
And Github there to see

Scripting Time is Here
The days end draws so near
A single line, does work for me
I head home and I am free….

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

If I were to ask how many of you LIKE editing the System Path in Windows I’ll bet I wouldn’t see a lot of hands up in the room.  I specifically wrote a function in PowerShell to edit the path for that reason.

As the path grows it becomes difficult to manage.

In Windows Server 2016 RTM there is a new Path editor (And it’s very easy to find and use!)

Drill down to the Environment Variables as you would normally under “Advanced Settings”

When you go to view your paths, especially the SYSTEM Path there’s a new cool option, it brings up a nice GUI Editor.

“Wow! This makes editing the path WAY better!” I thought but watch out… it’s a new Feature with some “undocumented features”

If you Choose “Browse” to select a path you’ll notice something, it’s missing the extra ‘\’ which I found causes some applications to miss that folder in a Search

You can of course easily highlight the entry and add in the missing ‘\’

The other one to watch out for is the “New” button to Add an entry.   If you click on “New” and try to immediately Browse to a folder you’ll find it deletes the entry above it.

That can’t be good!

But the solution is easy.  Click “New” and begin typing something … ANYTHING in the new Field and THEN browse away… Just again remember to add in the that missing ‘\’ when you’re done.

It was actually this feature that caused me initial issues with PowerShell 6 Open Source in that I browsed for C:\Program Files\OpenSSH and the entry was missing a ‘\’ at the end.  This caused PowerShell to skip over the folder as a file when searching for SSH.EXE

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

I’m doing a talk at MVPDAYS on Open Source PowerShell and one of the items I was most excited about I had to try… PowerShell remoting!

In the current release it’s still an interactive PowerShell session but it’s amazing what it will bring forth.   The option for a Windows Admin to remote to a Linux/macOS system with a PowerShell script from Windows!  Or simply to consume the text data from Linux and flip it to objects.   Natively converting Json and XML!

Or for the Linux admin stuck with some Windows Servers.  It means running your native Bash, firing up a PowerShell command to manage those Windows Servers the Business brought in… or in the long term using Cmdlets provided by Vendors like Dell to manage applicances…

It’s all about OPTIONS for the Admin.

But today I REALLY wanted to play with PowerShell remoting.   Jason Helmick showed it online with Jeffrey Snover and it really IS is.   Requirements are pretty simple too.

  • Open Source PowerShell at both endpoints
  • OpenSSH on a Linux / macOS
  • SSH_Win32 on Windows
  • Some minor configuration

And use is just as easy.

New-Pssession –hostname ComputerwithSSHServer –username whoeveryouare

After a password prompt you just connect and you’re in the OTHER side using PowerShell!

I had everything loaded up, the most current release of PowerShell from Github on Windows and Linux, Open SSH, followed the instructions to the letter and

bbbbzzzztt! nothing

Windows would not receive the open connection Linux with some weird cryptic error.  Linux could not receive from Windows.

Jason suggested the first thing which was “confirm SSH” works.   Which I did.    Pretty easy test too

SSH username@server

I poked about online and saw a reference from Microsoft regarding a bug in which the SSH_Win32 would drop a blank line with a successful connection in STDERR .   Since it was a recent bug and Jason had demoed the Open Source PowerShell with PSRemoting maybe a tad early than that… I guessed there might have been a bug somewhere about.

So stage one.  Rollback to PowerShell 6.0.0.9 and one version EARLIER of SSH_Win32.

Once I did THAT Linux happily connected to Windows via PowerShell Remoting!

But

…BUT

(yeah there’s always a But somewhere)

Windows still could not initiate the session.   Evil vile cryptic error message about he Endpoint having finished already. However in running through the troubleshooting (Running the SSHD in Diagnostic mode) I could see the connection didn’t FAIL it just NEVER ACTUALLY HAPPENED.

“That’s it! Pull out the big guns!  Mark Russinovich will LOVE THIS!  We’re going to use a Sysinternals tool to fix a buggy feature in PowerShell 6!”

Procmon.exe was downloaded.  I set it to only watch powershell.exe for events.   Cleared off the old events of course.

Started the New-Pssession –hostname eotubuntu –username energizedtech

Watched the fail

Stopped monitoring

Get rid of all the successes on the filter

Now…. LOOK

Drilling back the most recent set of entries I noticed a search through various folders for SSH.EXE and GET-SSH.EXE.  Including an interesting one.

‘C:\Program Files (x86)\Putty’

But I never had Putty on this server! It was a clean Server 2016 RTM.   Which told me…. (no no wait… looks like I did!)

Here’s the list it found

C:\Windows\system32
C:\Windows
C:\Windows\system32\wbem
C:\Windows\system32\WindowsPowerShell\1.0C:\Users\Administrator\Appdata\Local\Microsoft\Windows\Apps

But on Server 2016 it CLEARLY showed C:\Program Files\OpenSSH in the system path…. which was wrong.

It should ACTUALLY have been C:\Program Files\OpenSSH\ (Notice that extract Backslash? I DIDN’T)

So I re-edited the path to hold it and now it all works properly.

Why was it missing the Backslash?  I used the new “Browse for Path” feature in the Path Editor of Server 2016.   It did it.  Must be an undocumented feature.

With that change in place I could happily run PowerShell remoting from Windows to Linux or Linux back to Windows

….Can’t WAIT for Implicit Remoting !

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

I’m not going to ENABLE-RANT today.   Anybody that uses System Center Configuration Manager knows one thing, you need to MANUALLY add in the Cmdlets to use them using this line

Import-Module ‘C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\ConfigurationManager.psd1’

True, it’s irritating that I can just do something like this in a modern server

Import-Module ConfigurationManager

If this were there not only would it be EASIER to access the module locally, it would also allow me to create and establish Remote PowerShell sessions to EASILY work with Configuration Manager and make Implicit remoting far smoother.

But rather than get upset, I decided to sit down and find out why.  Why if I do THIS

Get-Module –listavailable ConfigurationManager

Does it NOT find the module?

The answer was surprisingly easy (and a bit silly it got missed by somebody)

For your module to be discoverable it needs to follow two rules

  1. The PSD1 file must be in a folder of the same name
  2. This Folder must be added to the System Environment variable “PSModulePath”

So examining my default PSModulePath on a Configuration Manager 1606 server It was DEFINITELY not there (yes, fully patched, rebooted multiple times)

$ENV:PSModulePath

C:\Users\Administrator.SYSTEMCTR\Documents\WindowsPowerShell\Modules;C:\Program Files\WindowsPowerShell\Modules;C:\Windows\system32\WindowsPowerShell\v1.0\Modules;C:\Program Files (x86)\Microsoft SQL Server\110\Tools\PowerShell\Modules\

So initially I thought I would just add it to the PSModulePath in the following fashion while in a PowerShell prompt as Administrator.

$ENV:PSModulePath=($ENV:PSModulePath) + ‘;C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\’

Tried that and looked and still nothing…. oh right forgot the FIRST rule

The PSD1 file must be in a folder of the same name

Our problem is that all of the needed files and content exist in the BIN folder and it needs to be renamed to ConfigurationManager.  But obviously we can’t do THAT or things will break.  

We COULD just make a copy of that folder called “ConfigurationManager” and add THAT to the path.  That might work too. But that offers up other scary words.

  • “Supportability” (Microsoft probably won’t support that)
  • “Patching” (If it DID work, we’d have to dupe that folder EACH and EVERY TIME we patched)
  • “Works?” (Moving supporting Binaries in ANY major application is just Ripe with Risk)

The it dawned on me.  Since VISTA (Stop cringing) we’ve had Junctions.   A Junction is a “Pseudo Folder” which ACTS like a Directory but points off to another Directory.

We COULD create a Junction called “ConfigurationManager” and point it RIGHT BACK to the folder with all of the goodies needed in the Configuration Manager module.

Well guess what… it works! Here’s the Script in PowerShell to make this useful for you as well.

# Create a Junction to act as a folder called “Configuration Manager” pointing to the
# ‘Bin’ folder which has the Actual Configuration Manager module
# This provides a “Pseudo Folder” to match the Module Name needed

$TargetFolder=’C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\bin\’
$TargetPath=’C:\Program Files (x86)\Microsoft Configuration Manager\AdminConsole\PSModule\’

# Verify this has not been done yet, if it has go ahead
If (!(Test-Path “$($TargetPath)ConfigurationManager\”))
{
New-Item -ItemType Directory -Path $TargetPath –Force
CMD.EXE /C MKLINK /J “$($TargetPath)ConfigurationManager” $TargetFolder
# You can use this line INSTEAD of MKLINK if you are running
# PowerShell 5
#New-Item -ItemType Junction -Name ConfigurationManager -Value $TargetFolder -Path $TargetPath
}

# Permanently update the PSModulePath Environment variable
# With the parent path holding the Configuration Manager folder
# This will make it fully discoverable

$OldPSPath=(Get-ItemProperty -Path ‘Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment’ -Name PSModulePath).PSModulePath

# Verify this has not been done yet, if it has go ahead
IF (!($OldPSPath | Select-String -SimpleMatch “$($TargetPath)ConfigurationManager”))
{
$NewPSPath=$OldPSPath+’;’+$TargetPath+’ConfigurationManager’
Set-ItemProperty -Path ‘Registry::HKEY_LOCAL_MACHINE\System\CurrentControlSet\Control\Session Manager\Environment’ -Name PSModulePath –Value $NewPSPath
}
$ENV:PSModulePath=$NewPSPath

Now I can just run Import-Module ConfigurationManager and Woohoo! I’m off to races!

I’ll post this to the Technet Gallery later on.

Share and Enjoy!

Sean
The Energized Tech
Honorary Scripting Guy

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Today’s little share is not “PowerShell related” but it’s something I personally encountered and I thought it would be good to share.  I’ve been using OneDrive for a LONG time and when I started using One Note, it defaulted to my OneDrive account.  

This was really cool because the content kept synching, was always accessible remotely or locally.

As I started working for my current employer, I used it to keep track of rough notes on work for various clients.    One challenge however.

It was still on my Personal OneDrive.   I wanted to move my Corporate work to either a Central Sharepoint location or at LEAST to my One Drive for Business.

Here’s the problem I hit against.

If you go to OneDrive and click on the “One Note Notebook” in question there is NO download option.  (Most other documents you usually get that)

The answer is actually pretty simple.  I ran across in the Answers forum on Technet

Create a New Folder in OneDrive (I called my New OneNotes)

  

Move the One Note document to the Folder

Download the Newly created Folder

At this point once you click on download your browser will want to store away this as a ZIP file.   Store this away to a convenient location for later use.

Now you can have a copy.  Extract the contents of this zip file to a folder and copy the folder to your target location.  It can be

  • Local folder
  • File Share
  • One Drive for Business folder
  • Sharepoint Documents folder

Once you have copied the data to the Target location, you’ll need to open it at least Once for One Note to add to the list of Note Books.   In One Note 2016 just click on “File” and then “Open”

from this point there is a browser for navigating your various file locations.  Navigate to the new one, select your folder in question, then open the “Open Notebook” file just underneath the name of the folder.

Sometimes One Note may prompt you with a message like “A notebook cannot be found at this location.  Do you want to open …..” just click yes.   It’s nothing bad.

At this point you are now looking at your copy of the One Note document.  But you need to switch it from “Archive” to live.    You can tell from the above warning.

Click on the pretty yellow line to continue forward and allow the conversion to occur.  It will prompt you to Convert a Single Selection or the Entire Notebook.  In my case I’d like to convert the Entire Notebook

The process will step through all of your individual sections and convert them up to your modern version of One Note.   At this point you have now made a copy of your PERSONAL One Drive to your Business folder.    From here you can go through and delete sections and content that are yours and leave your business data behind for work.

Also note, this is a COPY.  If you MESSED up? (Oh … oh that just NEVER happens with computers …. Right?  Right? Nudge nudge) . 

Just remember you have a ZIP file you downloaded before.

Share and Enjoy!

Sean
The Energized Tech

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Here’s one I ran into today.  It might be documented somewhere but I just couldn’t find it

When targeting software for the Office Deployment Tool almost every version shows this as the Product name

O365ProPlusRetail

This is for Office 2013 or Office 2016 from Office 365

If you are trying to deploy Office 2013 or 2016 (Click to Run edition) from the MSDN or Volume media change it to

ProPlusRetail

The rest of the file should remain the same.  The same goes for your download.xml file.  Update the PID to reflect “ProPlusRetail” or I believe just pull off the O365 reference.  This will download the proper bits for the media and language.   It should also allow you to accept the proper product key.

Share and enjoy

Sean

The Energized Tech

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

cThis script is not very efficient (downloads everything twice, working on that still BUT)

If you’d like to conveniently download all the ebooks Eric Ligman has been kind enough to share out… You can run this in PowerShell 3.0 or higher (It was tested in Windows 10 – Powershell 5 but should work in earlier versions)

# Create Web client object

$Wc=New-object system.net.webclient

$link=’https://blogs.msdn.microsoft.com/mssmallbiz/2016/07/10/free-thats-right-im-giving-away-millions-of-free-microsoft-ebooks-again-including-windows-10-office-365-office-2016-power-bi-azure-windows-8-1-office-2013-sharepoint-2016-sha/’

# Download the source page

$result=Invoke-WebRequest -Uri $link

# Get a list of the URLS of the books and resources with Eric’s short name in there

$URIList=$result.links | where { $_.OuterHTML -match ‘ligman.me’ }

Foreach ($URI in $URIList)
{
# Get the Download link

$DownloadLink=$URI.href

# Find the original filename (Thanks to Dr. Tobias Weltner’s tip on this!)

$Response=[system.net.webrequest]::Create($DownloadLink).getresponse()
# Scoop out the file name

$filename=($Response.ResponseURI.AbsolutePath.split(‘/’)[-1])
# Download the goodies

$wc.downloadfile($downloadlink,$filename)
#
$Response.close()
}

This will take a while and it’s NOT going to show a progress bar (you can play with that) but you don’t need to sit and watch.   Warning… this may hit your bandwidth so try to do it on your personal account…. not the company internet

Read Full Article
Visit website
  • Show original
  • .
  • Share
  • .
  • Favorite
  • .
  • Email
  • .
  • Add Tags 

Separate tags by commas
To access this feature, please upgrade your account.
Start your free month
Free Preview