Tag Archives: PowerShell

SCCM PowerShell: Connect to SCCM Function

    Today’s post is another time-saver function I wrote to connect to SCCM. Again, it is designed to eliminate the need to hard code the module path and/or the SCCM primary site. It allows me to just type Connect-SCCM to import the module … Continue reading

Posted in MDT 2010, MDT 2012, MDT 2013, PowerShell | Tagged , , | 1 Comment

MDT PowerShell: Connect to MDT Function

  Todays post is a time-saver function I wrote to connect to MDT shares. It allows me to just type Connect-MDT to import the module then enter to the MDT PSdrive. It discovers the location of the MDT module(from the registry) and uses the Restore-MDTPersistentDrive … Continue reading

Posted in MDT 2010, MDT 2012, MDT 2013, PowerShell | Tagged , , | 5 Comments

MDT: Running a single PowerShell Cmdlet from a Task Sequence Step

Sometimes I want to perform small tasks that don’t really require a script creation. In those cases I use a Run Command Line task sequence step. It was always easy for cmd.exe and it’s just as easy for PowerShell.exe(once you … Continue reading

Posted in Deployment, MDT 2010, MDT 2012, PowerShell | Tagged , , | 10 Comments

LTI/ZTI PowerShell: Outputting Transcript from PowerShell Console

While testing a Lite-Touch deployment, I had an issue with a PowerShell script running in an application package. The error flashed by on the console screen so fast that I could not read it. To top that off, the log file … Continue reading

Posted in MDT 2010, MDT 2012, PowerShell, SCCM, Scripting | Tagged , , , | 6 Comments

LTI/ZTI PowerShell: Using Modules in deployment scripts

A great feature of PowerShell is the use of Modules. You use modules to store reusable code such as functions as an alternate to storing hefty code at the start of your scripts. MDT supports the use of modules in … Continue reading

Posted in MDT 2010, MDT 2012, PowerShell, Scripting | Tagged , , , | Leave a comment

LTI/ZTI PowerShell: Exit codes

When you run a script in your deployments, it’s good practice to let MDT/SCCM know how the script has ended. This will determine how your task sequence proceeds. You do this by exiting the script with a return code. I’ve … Continue reading

Posted in MDT 2010, MDT 2012, PowerShell, SCCM, Scripting | Tagged , , , | Leave a comment

LTI/ZTI PowerShell: Debugging Scripts (Part 3 of 3)

Testings results with a test matrix My Rename-Computer script is in production and I’ve made some major changes to it so it’s time for some major testing.  It’s important when testing your scripts to understand and document what your expected … Continue reading

Posted in MDT 2010, MDT 2012, PowerShell, SCCM, Scripting | Tagged , , , , , | Leave a comment