msgbartop
Everybody get your shell on!
msgbarbottom

Nov 12, 2008 8:49 am Using command line variables with Powershell

Sometimes it is useful to be able to input a variable(s) when calling your powershell script. This creates some flexibility as far as automation, and also allows you to easily re-purpose your script without having to modify the actual script or update a text file. There are two standard methods for using command line variables. [...]

Read the rest... »

Tags:

Nov 07, 2008 5:05 pm Verifying that a file exists with PowerShell

If you use PowerShell a lot, there are going to be times that you need to import data from another file (like a list of servers from a text file to automate a task on many machines). This snippet sets a variable to a file path, tests the files location using the test-path function, and [...]

Read the rest... »

Tags:

Nov 04, 2008 11:10 am Scripting de-provisioning of a client in DPM

If you are trying to automate your DPM environment, part of the process is de-provisioning protection groups when a server no longer needs to be backed up. This code snippet will take a clientname input and dpmserver input parameter and remove all data sources (which will effectively remove the protection group) for that client. This [...]

Read the rest... »

Tags: ,

Nov 03, 2008 6:24 pm How to reboot a machine and wait for it to come back up in Powershell

This bit of powershell code will take a clientname input parameter, immediately reboot the machine, and wait up to 3 minutes for the machine to come back up. After it has been 3 minutes or the machine has come back up, it will display a message depending on the situation. 1 2 3 4 5 [...]

Read the rest... »

Tags:

Oct 31, 2008 4:13 pm Running DPM scripts outside of the DPM Management Shell

For the most part, running scripts through the DPM Management Shell works for most people. However, if you have many people that may be using your DPM oriented scripts (any script calling a DPM specific commandlet), it may be less confusing for them to run those through the actual powershell console. Also, this allows you [...]

Read the rest... »

Tags: ,