Showing posts from 2009

Active Directory Scripting

I was looking for a script the other day and found this post very helpful

Adding 1,000 Users to a Security Group
Demonstration script that creates a security group named Group1, and adds one thousand users (UserNo1 through UserNo10000) to that group. This script is not intended for use in a production environment.
Set objRootDSE = GetObject("LDAP://rootDSE")
Set objContainer = GetObject("LDAP://cn=Users," & _
Set objGroup = objContainer.Create("Group", "cn=Group1")
objGroup.Put "sAMAccountName","Group1"
For i = 1 To 1000
strDN = ",cn=Users," & objRootDSE.defaultNamingContext
objGroup.PutEx ADS_PROPERTY_APPEND, "member", _
Array("cn=UserNo" & i & strDN)
Thanks to Arron Parker for his writeup on the changes
Profile Changes in Windows Vista/Longhorn Serverby Aaron Parker on Friday, August 25, 2006in Windows Windows Vista and Longhorn Server introduce a number of new user profile paths and environment variables that differ from earlier versions of Windows and these changes may have an impact on scripts such as logon scripts and application install scripts. Most scripts should work correctly – VBScript scripts that use system functions to find folder paths should work as expected, however batch scripts that use environment variables or hard codes scripts will require modifications. Here’s a short run down of the changes.The following table lists the old profile path and the corresponding new path under Windows Vista/Longhorn Server:Old PathNew Path\Documents and Settings\Users\Documents and Settings\Default User or
%LOGONSERVER%\NETLOGON\Default User\Users\Default or
%LOGONSERVER%\NETLOGON\Default User.v2\Documents and Settings\\My Documents…

2008 R2 Remote Desktop Services, Web Access, Connection Broker, and Gateway Service.

So when i was tasked with allowing our top level execs to access specific resources in the event of a H1N1 out break, i figured it would be a big pain in the A**. However with the release of R2, the process was so simple i was confused as to how easy it was (easy is something im not used to).
I will post the setup process soon................

Datatel UI 2.3 Install Script

Yes this turd-tastic software is back with a new version 2.3! Same old poorly desighned datatel client that leaves a bad taste in your mouth. well if your looking for help geting this installed look no further as i have taken som of my previous scripts and fixed them for the new client. Enjoy!
On Error Resume Next
' First we Uninstall Datatel UI 2.2
Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("MsiExec.exe /uninstall {726A85FE-D304-4C4A-8167-D8A24A7C86F9} /quiet")
Do While oExec.Status = 0
WScript.Sleep 100

'Next we do some cleanup of the All User's Folder

Set IBMFolder = CreateObject("Scripting.FilesystemObject")
Set DatatelFolder = CreateObject("Scripting.FilesystemObject")
DatatelFolder.DeleteFolder("C:\Documents and Settings\All Users\Application Data\Datatel")
IBMFolder.DeleteFolder("C:\Documents and Settings\All Users\Application Data\IBM")

'Begin Install of Datat…

WDS converting legacy images to WIM

here is what i had to do on moving from a 2003 WDS server running in legacy mode to a 2008 WDS server running in native (only option is native) with a bunch of XP images.

first setup your 2008 WDS server, for the most part the wizzard is self explanitory, install, point images to a diffrent drive other then the %system% drive and begin. However some issues i had to over come are multiprocessors and single processors for XP (vista\7 does not care about HAL's)

for the base install of an XP image i took parts that pertained to me from Lucius Craig's Guide

Step 6 and Step 7 (uploading image to WDS worked just fine for me)

I left the PE image on there for trouble shooting later on down the line, however i have not had to use it yet

For XP i had to create 2 XP SP3 Captures because some PC's have dual core and some single core and the HAL for xp will not let you do DC on a SC.

This Guide from helped me setup the capture portion (works great)

now the issues i had

New Ceridian Update

the updateHot Fix 7.5.0-C can be a pain to do since you have to register a dll on a remote server. This may help with the process.

Create a .cmd file and input the following:

FOR /F %%I IN (clients.txt) DO call :COPYFILES %%I

IF %1 =="" Goto :END
psexec -u domain\user -p password \\%1 Regsvr32.exe /s \\ceridianserver\Source\BIN\PREPEMP.DLL

Save the .cmd file in a folder, copy psexec.exe into the folder, and create a .txt file with the name of all the clients you want to register (one name per line) change the "domain\user" and "password" parameters in the .cmd file and run. Each computer should get psexec exited with a status of "0", if you dont
get status "0" then something went wrong.

Adobe Blue screen's when 2 PDF's are opened at the same time

well here is a new one, when you open 2 pdf's at the same time in acrobat reader 9, and you have 2d acceleration enabled (default) windows pukes.

found this article that explains it just the same senario except we are using ATI, however disabeling the 2d does fix the problem.

TopicAcrobat Reader 9 Crashes PC When Opening 2 Documents Simultaneously (2D Graphics Acceleration Relateshaungupta - 09:31pm Dec 16, 2008 Pacific

Hey all,

Weird issue. I noticed my Adobe Acrobat Reader 9 crashes when opening two PDF's simultaneously. The first one opens just fine. The second one, a new window opens, but there's only black inside the 2nd Reader window. It finally (after way too long) begins to show the document, and then I get a blue screen of death with a fault in nvlddmkm.sys, the nVidia display driver for my video card. It says it was unable to reset the display drivers, dumps the memory, and reboots. One interesting note is that if I close the "black" window before it blue s…

Easy Uninstaller for Norman Anti Virus

yes i said Norman (not to be confused with Norton). This POS antivirus has missed countless virus'es, trojans, and backdoors running on workstations and im am more then happy to see it go. for those of you also jumping ship here is a simple vbscript to uninstall

Dim WshShell, oExec
Set WshShell = CreateObject("WScript.Shell")
Set oExec = WshShell.Exec("C:\Norman\nvc\Bin\Delnvc5.exe /quiet")
Do While oExec.Status = 0
WScript.Sleep 100
Dim WshShell2, oExec2
Set WshShell2 = CreateObject("WScript.Shell")
Set oExec2 = WshShell2.Exec("shutdown -r -t 120")
Do While oExec2.Status = 0
WScript.Sleep 100

I used a bat file to run this against may workstations with psexec.exe

FOR /F %%I IN (clients.txt) DO call :COPYFILES %%I

IF %1 =="" Goto :END

copy uninstall.vbs \\%1\c$
psexec.exe \\%1 wscript.exe C:\uninstall.vbs


Hyper-V vs Xen vs Vmware

I would like to start out saying i have always been a supporter of VMware, their product was great implementing my first virtual data center. However after testing both VMware, Xen, and Hyper-V I have become more and more fond of Hyper-V for several reasons.
1. Its included in the 2008 OS (free)
2. Its a familar windows interface , and makes teaching older admins easier
3. Fail Over clustering is (free)
4. If you buy datacenter edition, you can install as many manchines as you want , and they are covered by the datacenter lincense.

VMWare although has the lowest disk and memmory footprint, is just too expensive to for the same fuctionality.

Xen, was a contender however it was targeted towards more virtual linux platforms and since its free release many linux stros have jumpedship in favor of KVM

My current deployment is under way and i will report back after a few months of usage.