Tag Archive for 'PowerShell'
December 28th, 2011 by Michael
We use Citrix for a lot of applications, and I have a need to launch Outlook, then an application, and then close Outlook when that application is closed by the user. This seems like a pretty simple thing to do (and I suppose it is, sort of) but it took me a while to figure [...]
July 29th, 2010 by Michael
If you want to know what logon script users are getting, this is an easy way to get that information: Import-Module -Name ActiveDirectory Get-ADUser -Filter * -SearchBase "OU=YourOUName,DC=YourDomain,DC=COM" -properties ScriptPath | Export-Csv "c:\script\ADUser.csv" Note: In order for this to work, you have to have the ActiveDirectory Module loaded.
March 25th, 2010 by Michael
I have been working on a simple little script to copy a file and then launch a program. I am sure that there are a lot of ways to do it, but I decided to use PowerShell, and this is what I came up with: $CheckForFile = "H:\custom.ini" $FileToCopy = "c:\IT\custom.ini" $CopyFileTo = "H:\" $PathTest [...]
March 4th, 2010 by Michael
I seem to run into an issue when I run some PowerShell scripts where I get prompted at each line of the script for confirmation. That can get really annoying, so I have to look up how to prevent that behavior. Thankfully, there is already some good information out there on how to do that: [...]
February 24th, 2010 by Michael
At some point, I had a desire to list all the computer accounts for any server OS in Active Directory. I am pretty sure that I did a search and found the script below, but I don’t remember where, so whoever wrote it doesn’t get credit this time… $strCategory = “computer” $strOperatingSystem = “Windows*Server*” $objDomain [...]
September 22nd, 2009 by Michael
I have written a lot of scripts that use .txt files to read or store data, but I have a need to read some information from an .xml file. This could be done by treating the file as a simple txt file, but it would require some pretty good filtering that is already a part [...]
September 4th, 2009 by Michael
One of the things that we spend a lot of time on is trying to keep track of what servers have enough free space. We have a lot of different tools to check drive space, and we even use some of them from time to time. We have a pretty complicated system created by Rickey [...]
August 7th, 2009 by Michael
Previously, I blogged about issues I was having where old recovery points were not being expired/removed from my DPM servers. I had to open a ticket with Microsoft, and worked with them to determine the cause, and since then, they have released a fix. The fix that Microsoft developed is here: http://www.microsoft.com/downloads/details.aspx?FamilyID=aee949aa-d3e7-4b0f-b718-00b7c20f1257&displayLang=en A few people [...]
April 12th, 2009 by Michael
I have been using DPM for about 7 months now. (I tested with it for a few months before that.) I never installed 2006, but 2007 seems to be working ok. I have a few complaints, but I have complaints about all the backup software that I have ever used. None of it really makes [...]
March 25th, 2009 by Michael
If you deploy servers from an image, and you would like to install DPM prior to imaging, you can’t just use the install option from the DPM server. You CAN install the agent manually, and then configure it later. Copy the latest agent files from C:\Program Files\Microsoft DPM\DPM\Agents\RA and put them somewhere you can get [...]