
We work hard to ensure our content relates directly to your daily productivity. This content overview and assessment quiz will help you judge whether these learning materials are a good investment of your valuable time!
The desktop is definitely a beast to manage. There are some fundamental differences in the desktop platform that must be accounted for when scripting. Largely these have to do with how the platform is utilized and managed (direct user logons, connections from many different public and private networks, non-corporate machines connecting to the domain) and the sheer numbers.
These fundamental differences require a "desktop perspective" in order to create scripts that function smoothly across all target clients.
Powershell.exe has a set of switches that can be used to control execution of scripts and consoles. It turns out that some of these are exceptionally helpful in making sure that your scripts run reliably on all of your desktop computers.
Did you know you can run PS1 scripts on all your machines without bothering to run "Set-ExecutionPolicy" on any of them?
This module demonstrates the use of the most critical of these switches.
In the lesson "Important PowerShell Switches for Enterpris Desktop Management" we learned that it isn't actually necessary to set PowerShell's execution policy on all your machines if you run PowerShell.exe from your management system. You may still want to set it for other types of script execution and it is important that you set it individually for both 32-bit and 64-bit execution.
Lesson Includes Ready-To-Run (RTR) Code.
PowerShell Scripts (.PS1 files) do not automatically execute. It can be a challenge to remember to open a prompt (possibly elevated) and remember all the command line options for both PowerShell.exe and your script switches. This is especially challenging if you need to direct end users or other technicians on how run the script. This lesson and the accompanying Ready-To-Run code allow you to specify all these options in a CMD file which can be double clicked in Windows Explorer or launched from links in email.
It takes using it for several weeks to realize how convenient it is to be able to simplify PowerShell script execution down to a couple clicks.
Lesson Includes Ready-To-Run (RTR) Code.
Whether a script processes as 32-bit or 64-bit can affect the commands within the script, especially with regard to configuring the registry for 32-bit software or calling Windows EXEs. This lesson and the accompanying ready-to-run code allow the desired execution bitness to be set inside the script and it will always run in that bitness, no matter whether it is called by a 32-bit or 64-bit process.
Lesson Includes Ready-To-Run (RTR) Code.
Figuring out whether your script has administrators rights seems simple and it is, provided that the method employed is to check the process token for admin rights. This lesson introduces a very handy type accelerator that can make many of your PowerShell "checks" much easier.
Lesson Includes Ready-To-Run (RTR) Code.
PowerShell editors are notoriously slow to startup. They can't really be blamed because there is a lot of work to get .NET staged to work with the editor. If you are searching many files for a precious snippet of code, it can be frustrating to bounce in and out of your editor.
After you configure your system to view PS1 code right in Windows Explorer preview pane, even notepad's startup delay will seem like a long time!
Learn some great PowerShell coding techniques while also building a very useful oneliner.
Lesson Includes Ready-To-Run (RTR) Code.
This video shows you how to use the CSI-Windows.com PowerShell Extensions for Windows Explorer configuration script.
To ensure your scripts work correctly on all machines in your company you will likely need to test:
This script configures the ability easily launch the above scenarios from Explorer's right click menu.
Lesson Includes Ready-To-Run (RTR) Code.
This lesson is a tidy summary of what you've learned in this course.
Putting together a simple PowerShell Script is the easy part...
Ensuring that script will run reliably on thousands of Windows machines scattered across the globe is where a little guidance can save you a lot of time!
This course is a cheat sheet for getting your scripts to run reliably on the Enterprise Desktop. Most of the concepts and samples apply equally to servers.