Thursday, December 31, 2009
Remove all DL membership from a user
Import-Csv c:\My_UserNames.csv | foreach {(Get-QADUser $_.DisplayName).memberof | Get-QADGroup | Remove-QADGroupMember -Member $_.DisplayName}
The above line will read all names from a CSV. It will then find the DLs that the user is a member-of and call Remove-QADGroupMember to remove the member from the specified DLs. This command will run on all the DLs that a user is a member-of. 'foreach' will cause the entire command to run for all the users listed in the csv file.
We need to pipe it to Get-QADGroup because .memberOf spits the DN of the DLs and Remove-QADGroupMember will not take the DN as the identity for the DL.
------------ End of Document ------------------------
Tags: Active Directory, PowerShell, Exchange Server
Published Date: 20091231
Wednesday, November 18, 2009
Change multiple user password using command line
Set-QADUser –Identity
The above command will set the password for User to the one specified in this command.
Import-Csv UserList.csv | foreach {Set-QADUser -Identity $_.UserName -Password $_.UserPassword -UserMustChangePassword $True}
The above command will read the UserName and UserPassword from and excel sheet UserList.csv and will set them accordingly. You need to keep the row headers as UserName and UserPassword in the CSV. The most important feature here is that you can have a different password for each individual user in the sheet.
------------ End of Document ------------------------
Tags: Active Directory, PowerShell,
Published Date: 20091118
Friday, March 6, 2009
Convert lastlogon or laslogontimestamp to date
w32tm /ntte 128787219065874052
[Output] 149059 06:45:06.5874052 - 2/10/2009 12:45:06 AM (local time)
w32tm /ntte 128805109570324972
[Output] 149079 23:42:37.0324972 - 3/2/2009 5:42:37 PM (local time)
------------ End of Document ------------------------
Tags: Active Directory, Windows Server 2003, Windows Server 2008
Published Date: 20090305
Tuesday, January 6, 2009
Edit Environment Variables without Admin Rights
As a System Admin in an organization one always comes across a situation when users want Admin Rights because they cannot modify System Environment Variables(generally required by developers to change JAVA_HOME and CLASSPATH). However there is no need to give users Admin Rights for such small task.
Instead, they can create User Variables that override System Variables when they log on. The only exception to this rule is the PATH variable whose contents is composed of the system and user variables, separated by a semicolon.
------------------- End of Document -----------------------
Tags: Windows XP
Published Date: 20081002
Thursday, January 1, 2009
Remaining Part
To check the previous par of this post click here.
i8042 is a system service that controls ps2 mouse and keyboard ports. Some of the features of this driver are:
- Hardware-dependent, simultaneous operation of a PS/2-style keyboard and mouse device
- Management of I/O Port and IRQ settings and routines
- Plug and Play and power management
- Operation of legacy devices
- Other interface and interaction components between the operating system and these types of devices
However if your server does not have a ps2 device attached or your BIOS disables ps2 ports to save IRQ, i8042 would still search for hardware and if it deos not find any ps2 device OR gets a weird data from BIOS, it would error out.
There are two ways to fix this:
A. Create a parameter in i8042 service properties to identify it as a headless node.
- Go to Start > Run and put "regedit.exe" and click "Ok"
- Navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\i8042prt\Parameters in Registry Editor
- Add a new REG_DWORD "Headless" and set the value to 1
- Reboot the server.
OR Infuse new life in your OLD PC
B. Disable the i8042 service from registry.
(**Be careful you may not be able to use PS2 Mouse and keyboard if you do so**)
- Go to Start > Run and put "regedit.exe" and click "Ok"
- Navigate to HKEY_LOCAL_MACHINE\System\CurrentControlSet\Services\i8042prt in Registry Editor
- Change the REG_DWORD value "Start" from "1" to "4". This sets the i8042 service from SERVICE_BOOT_START to SERVICE_DISABLED
- Reboot the server
The reason why it only happens in some cases only is because some BIOSes have a setting to enable/disable ps2 ports. You can set this to enable, disable or auto.
In auto mode, if it does not detect a ps2 device it might disable the ps2 port to save an irq. However, some BIOSes have no setting at all and behave as "auto" mode by default. If i8042 search for hardware and finds no ps2 or gets a weird data from BIOS pnp, might error out.
DONT LEAVE THIS PAGE NOW.
:::::CHECK THIS SITE before you move on::::::
Fly this holiday anywhere around the world & save on huge on cheapest airfare using an exclusive CheapOair coupon Code HOLIDAY10. Simply plug in this coupon code when buying your airline ticket at CheapOair.com and save $10 on all domestic & international flights. Coupon Code Valid till Dec 2008
-------------- End of Document -----------------
Tags: Windows Server 2003
Published Date: 20090101