Code:

code:
$objWshNetwork=CreateObject("WScript.Network")
$objWshShell=CreateObject("WScript.Shell")
$objADSysInfo = CreateObject("ADSystemInfo")
$strComputerName = $objWshNetwork.ComputerName
$strComputerDN = $objADSysInfo.computername
$objGroup=GetObject("LDAP://CN=GroupName,OU=GroupOU,DC=Domain,DC=com")
If $objGroup.IsMember("LDAP://"+$strComputerDN)
run "rundll32 printui.dll,PrintUIEntry /ga /c \\$strComputerName"+" /n <\\printserver\sharedprintername>"
EndIf

The above line's functionality: "$objGroup=GetObject("LDAP://CN=GroupName,OU=GroupOU,DC=Domain,DC=com")" is incorrect.

Issue: I need code that will get ALL of the group memberships for the specific computer.

Functionality: The computer will boot up, authenticate to AD, read its appropriate Group Policy, run the login script, then the login script will check all of the groups it is a member of. Once it gets this group membership, then it will install specific printers based upon group membership, as shown in the above code.

Does anyone know how to do this???

MANY thanks!
Jason