PowerShell
PowerShell Is Available for Linux, MacOS and is Open Source! Print E-mail
PowerShell
Written by Darwin Sanoy   
Friday, August 19, 2016 7:26am

If you're a PowerShell enthusiast you've been hearing a couple things for a long time.  The first is Linux admin envy for something on Windows - yes the veritable PowerShell got the attention of many a Linux afficiando.  The other thing is hearing Microsoft saying "Someday PowerShell will be on Linux."

 
Automating Around The Dreaded "Removed" Windows Features... Print E-mail
PowerShell
Written by Darwin Sanoy   
Friday, March 4, 2016 1:00am

Working at a client site a while back I came across a problem when attempting to install .NET 3.5 on Server 2012 R2.  Microsoft decided to remove install source for this component from a default Windows build from ISO.  Technically the feature should be pulled from Microsoft Updates if you ask for it - but there are certain conditions under which it generates an error instead.  The classic answer you'll find posted a thousands times on the web is that you have to provide a pointer to the 275 MB ..\sources\sxs folder from the installation media.  Not a problem if you only build servers in one environment, but it is a unnecessary logistical nightmare if you support the need to build them on workstation hypervisors (VMWare, Hyper-V, VirtualBox) or in multiple isolated cloud environments or tenants.  Guess what - you don't actually have to do it - here's the fix...

 

 
Getting Chocolatey Package Management Provider Working on Windows 10 Print E-mail
PowerShell
Written by Darwin Sanoy   
Sunday, February 28, 2016 1:00am

Have you had some frustrating experiences trying to use the new Chocolatey Package Management provider on Windows 10?  Me too!  But I have some tips to help you get it working as well as possible.

 
Fastest Way To Get Your Hands on the New Win32-OpenSSH Print E-mail
PowerShell
Written by Darwin Sanoy   
Thursday, February 18, 2016 10:37pm

If you're like me, you grow tired of having to install a seperate terminal utility on Windows to use ssh to connect to the vast array of devices and services that use it as a primary communications mechanism.  Why can't it just be done from the command line like every other OS?  That's changing...

 
Automation: Disabling Windows 10 Upgrade Through Windows Update Print E-mail
PowerShell
Written by Darwin Sanoy   
Sunday, February 7, 2016 9:45am

Recently Microsoft has changed the Windows 10 Upgraded in Windows Update to a "Recommended Update".  This dramatically expands the possibilities of some bad upgrade experiences for corporate users who do not realize the possible consequences of upgrading.  Here's a little automation to help you with that...

 
Championing PowerShell: Create Experts At Your Company Print E-mail
PowerShell
Written by Darwin Sanoy   
Tuesday, November 24, 2015 8:14am

I need PowerShell, you need PowerShell, we all need PowerShell...but getting the time to invest in learning the technology can be a challenge!  We all have a lot of pressure to be productive with our regular work tasks. When this pressure is combined with existing proficiency in another scripting language, it can be a recipe for not moving forward.

Let's discuss how becoming an advocate for PowerShell in your company helps create the room for yourself and others to learn this critical IT skill. The information we'll discuss is sourced from my own experiments while advocating PowerShell adoption within an IT group of about 250.

 
Graphical JSON Editor - Great for Azure Resource Manager Templates Print E-mail
PowerShell
Written by Darwin Sanoy   
Wednesday, September 23, 2015 7:16pm

JSON is the native data format for data exchange with the REST APIs.  In theory humans would never have to see the data format - so it's very detailed and nested syntax would not create any problems.  Ahhh, but it's to tempting to not use it as a human authored specification file and the latest thing to use it as a hand coded input format is the new Azure automation known as Azure Resource Manager (ARM).  I was on a quest to find a *Free* JSON editor that let me *edit* not just *view* the JSON data in a tree view.  That quest ended when I found...

 
Poodles Through Burning Hoops: Plan for PowerShell 5 on Win 7 and 2008 R2 (And PSH 5 Prod Preview) Print E-mail
PowerShell
Written by Darwin Sanoy   
Saturday, September 5, 2015 3:24pm
The PowerShell Production Preview was released on August 31st and the version number is 5.0.10514.6 !
Back in May I published the article "Getting PowerShell 5 Running on Windows 7 and Server 2008 R2"  It turns out there are a lot of poodles to get through the burning hoops to get a Windows 7 SP1 or Server 2008 R2 machine updated from PowerShell 2 or 3 to PowerShell 5.   "...from PowerShell 2.0..." !?! - like who in their right mind is on PowerShell 2.0 ?
 
Avoid The Panic: Company Start Menu Folder Changed and I have Hundreds Of Packages to Update Print E-mail
PowerShell
Written by Darwin Sanoy   
Wednesday, June 17, 2015 6:49pm

I was teaching a great team of Packaging Automation Engineers our course "Windows Application Internals for Packaging, Virtualization, Automation and Troubleshooting" and their company had recently gone through a re-branding which included a company name change.  They were looking at a lot of work to comply with the request to change the start menu folder their company uses from the old company name to the new one.  Hundreds of packages to rebuild and reinstall ?  There has to be a better way!  There is...

 

 
Getting PowerShell 5 April Preview (5.0.10105) Running Windows 7 and Server 2008 R2 (some assembly required) Print E-mail
PowerShell
Written by Darwin Sanoy   
Thursday, April 30, 2015 9:48pm

I am very excited that the PowerShell team has just delivered the April Preview that allows version 5 to run on Windows 7 SP1 and Server 2008 R2 (PowerShell Version 5.0.10105).  For this preview version there are a few foibles to getting it running on Windows 7.  The PowerShell team hopes to sort these out, but in the mean time I have put together a quick config that steps you though everything with one command line.

 

 
Oneliner: Enumerate Local Drives, but NOT App-V 4 Virtual Drive Print E-mail
PowerShell
Written by Darwin Sanoy   
Thursday, April 23, 2015 8:37am

I had a need to list all local drives and went for the old fall back win32_logicaldisk, but I noticed it listed the App-V 4.6 virtual drive when scanning for type "3".

 
Oneline of Code to Setup WMF 5, PowerShell 5 and the DSCResourcekit Print E-mail
PowerShell
Written by Darwin Sanoy   
Saturday, March 28, 2015 1:27pm

It's true that you can download and install the WMF / PowerShell 5 preview, install it and then with PowerShell-Get, install whatever DSCResourcekit modules you want - or use a command to install them all.  But that takes too long for my ADD - especially when I need a multi-machine setup to try out the walk throughs in either of the excellent Microsoft Virtual Academy classes Getting Started With PowerShell Desired State Configuration DSC or Advanced PowerShell Desired State Configuration (DSC) and Custom Resources!

 
Simple Settings / Data Storage and Retrieval In the Registry Print E-mail
PowerShell
Written by Darwin Sanoy   
Thursday, February 5, 2015 9:16pm

Many times I've wanted a simple settings store for storing state data or settings for a script.  I thought there must be a built-in way to store and retrieve a hashtable in the registry - that would be leanest and most natural way to do it!  I was wrong... er, actually, now I am right - because like a good PowerSheller I went off and built it  :)

 
Paradigm Shift: The Power of Functions that Take Pipelined Input Print E-mail
PowerShell
Written by Darwin Sanoy   
Tuesday, December 16, 2014 1:00am

I wanted to build a simple function that merges all the registry files in a folder as a simple way to configure systems.  It quickly got complex when I realized it would be nice if it could also merge a single file or a bunch of reg files from a entire folder structure.  Then it hit me!

 
PSH Oneliner: Detect If Running On Virtual Machine Print E-mail
PowerShell
Written by Darwin Sanoy   
Thursday, December 11, 2014 9:35pm

had to create a script that was only supposed to run on a virtual machine.  It needed to detect at least Hyper-V and VMWare, but I was about to get VirtualBox for free...

 
Idera PowerShellPlus Version 5.0 Released Print E-mail
PowerShell
Written by Darwin Sanoy   
Friday, October 24, 2014 6:59am

The free Idera PowerShellPlus remains my go to PowerShell editor for the unique combination of features it has...

 
PSH Oneliner: Find Last Logged On User(s) / Owner Print E-mail
PowerShell
Written by Darwin Sanoy   
Saturday, August 9, 2014 8:01am

Desktop management systems frequently add or update software using a user profile other than the actual user of the system.  This creates a classic problem in discerning which user profile(s) represent the active user(s) of the machine.  Several variants of this oneliner show a couple methods for identifying one or more "active", "recent" or "owning" users of the machine locally or remotely.  This article layer's up useful code that also demonstrates: selecting files by age, sorting one array with another, showing hidden files, selecting the most recent file and other techniques.

 
PSH Oneliner: Fix Up App-V Shortcuts When Migrating from SCCM 2007 to 2012 (Can be used for global fixup of shortcuts of any type) Print E-mail
PowerShell
Written by Darwin Sanoy   
Friday, July 11, 2014 8:23am

Even if you followed the Microsoft playbook exactly when doing App-V 4.6 on SCCM 2007, when you migrate to SCCM 2012 you may be in for some pain.  The App-V shortcuts installed by SCCM link to a special launcher that is part of the SCCM clinet.  In the case of 2007, this is probably linked to "c:\windows\syswow64\ccm\vapplauncher.exe".  These links end up breaking when the SCCM 2007 client is removed while upgrading to the 2012 client.  The following PowerShell Oneliner screams through (yes it is quick) the Win32_Shortcut WMI name space to find all shortcuts to this file and updates them very quickly!

 
PowerShell Array Filter - Filter One PowerShell Array With Another Array Print E-mail
PowerShell
Written by Darwin Sanoy   
Thursday, May 15, 2014 6:55am

In many languages combining or unisecting arrays is part of the standard operators or they have special operators to do this.  PowerShell does not have special operators and it has taken me a very long time to figure out how to make it do this!

 
PowerShell OneLiner To Almost Fill Up Your Hard Drive Print E-mail
PowerShell
Written by Darwin Sanoy   
Thursday, May 8, 2014 3:49pm
What possible use could you have for almost filling up your hard drive?  Read on to find out...
 
<< Start < Prev 1 2 Next > End >>

JPAGE_CURRENT_OF_TOTAL