How to find group members for n number of groups
$groups=get-content groups.txtForeach($group in $groups){Get-QADGroupMember $groupGet-qadgroup $group}
Find memberof for n number of users with powershell
$users=get-content users.txtForeach($user in $users){get-Qadmemberof $userGet-qaduser $user}
Extract the known attr for "n" number of users
$users= get-content users.txtforeach ($user in $users) {Get-QADuser $user -SerializeValues}
Find the Canonical Name for n number of users
$users= get-content users.txt
foreach ($user in $users) {Get-QADuser $user -sizelimit 0 Format-table canonicalName}
Find the Dispaly Name for n number of users
$users= get-content users.txt
foreach ($user in $users) {Get-QADuser $user -sizelimit 0 Format-table displayname}
Find the Dispaly Name,Caninicalname and Samaccountname for n number of users
$users= get-content users.txt
foreach ($user in $users) {Get-QADuser $user -sizelimit 0 Format-table displayname,canonicalname,samaccountname}
Monday, 21 February 2011
Extract the known attr for "n" number of users
$users= get-content users.txt
foreach ($user in $users) {Get-QADuser $user -SerializeValues}
foreach ($user in $users) {Get-QADuser $user -SerializeValues}
Sunday, 20 February 2011
Quest Powersheel
Guys,
Believe me or not? If yes and you are a MS-Directory Professional try it.
Benefits:
1. Where WAN connectivity is very slow you can work through command line.
2. Prevent accident deletion until you put exact deletion command.
3. You can automate you’re your AD environment.
4. Commands are easy to remember.
5. You can extract reports at a glance for million users with various parameters.
For more information see the below links and find the admin guide.
Download Quest Powersheel with admin guide.
http://www.quest.com/powershell/activeroles-server.aspx
Download Prerequisites
Microsft Powershell
http://support.microsoft.com/kb/968930
Dotnet framework 3.5 SP1
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d0e5dea7-ac26-4ad7-b68c-fe5076bba986&displaylang=en
For query purpose its does not require any kind of special permission.
See the below link also.
http://blogs.technet.com/b/manojnair/archive/2010/12/27/adding-users-to-ad-group-using-quest-powershell-command-lets.aspx
Before running any ps script put the below command.
Set-ExecutionPolicy Unrestricted
Believe me or not? If yes and you are a MS-Directory Professional try it.
Benefits:
1. Where WAN connectivity is very slow you can work through command line.
2. Prevent accident deletion until you put exact deletion command.
3. You can automate you’re your AD environment.
4. Commands are easy to remember.
5. You can extract reports at a glance for million users with various parameters.
For more information see the below links and find the admin guide.
Download Quest Powersheel with admin guide.
http://www.quest.com/powershell/activeroles-server.aspx
Download Prerequisites
Microsft Powershell
http://support.microsoft.com/kb/968930
Dotnet framework 3.5 SP1
http://www.microsoft.com/downloads/en/details.aspx?FamilyID=d0e5dea7-ac26-4ad7-b68c-fe5076bba986&displaylang=en
For query purpose its does not require any kind of special permission.
See the below link also.
http://blogs.technet.com/b/manojnair/archive/2010/12/27/adding-users-to-ad-group-using-quest-powershell-command-lets.aspx
Before running any ps script put the below command.
Set-ExecutionPolicy Unrestricted
Wednesday, 16 February 2011
How to create schedule task with system account
schtasks /create /tn "seclog-Backup" /tr c:\file_copy1.vbs /sc monthly /d 1 /ru "System"
schtasks /create /tn "sec-log-Backup" /tr C:\Script\Sec_Log_Copy.vbs /sc HOURLY /ru "System"
schtasks /create /tn "sec-log-Backup" /tr C:\Script\Sec_Log_Copy.vbs /sc HOURLY /ru "System"
Friday, 11 February 2011
DFS Refresh issue in Windows XP SP3
Here I am not going to explain what is DFS, yesterday I have fixed one major issue on DFS. The problem was, File list in the Windows Explorer folder is not refreshed after you create, move, or delete files. AS per Microsoft that issue has been fixed with XP SP2 but I have faced the issue in xp SP3.
Resolution Steps:
Install a Hotfix, I have given the Microsoft Link for that and create the below mentioned registry key.
Reboot the PC once.
http://support.microsoft.com/kb/953323
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
On the Edit menu, point to New, and then click DWORD Value. Type NoSimpleNetIDList, and then press ENTER. On the Edit menu, click Modify. Type 1, and then click OK.
Resolution Steps:
Install a Hotfix, I have given the Microsoft Link for that and create the below mentioned registry key.
Reboot the PC once.
http://support.microsoft.com/kb/953323
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\Explorer
On the Edit menu, point to New, and then click DWORD Value. Type NoSimpleNetIDList, and then press ENTER. On the Edit menu, click Modify. Type 1, and then click OK.
Thursday, 3 February 2011
Few steps for migrating 2003 to 2008
After completing the forestprep check the schema version and wait for the completeing the replication and then run the domainprep.
How to check the schema version.
http://support.microsoft.com/kb/556086
Schema version for new operation system
Find the Schema version for the operating systems
13 - Windows 2000 Server30 - Windows Server 2003 RTM, Windows 2003 With Service Pack 1, Windows 2003 With Service Pack 231 -Windows Server 2003 R244 - Windows Server 2008 RTM47 - Windows Server 2008 R2
________________________________
Take the system state backup of your schema master then disable the outbound replication and run the forestprep.
Repadmin /options +DISABLE_OUTBOUND_REPL
After getting the success log enable the out bound replication via repadmin.
Repadmin /options -DISABLE_OUTBOUND_REPL
Wait for competing the replication.
Pls see the link also.
http://social.technet.microsoft.com/wiki/contents/articles/migrating-active-directory-domain-controller-from-windows-server-2003-to-windows-server-2008.aspx
How to check the schema version.
http://support.microsoft.com/kb/556086
Schema version for new operation system
Find the Schema version for the operating systems
13 - Windows 2000 Server30 - Windows Server 2003 RTM, Windows 2003 With Service Pack 1, Windows 2003 With Service Pack 231 -Windows Server 2003 R244 - Windows Server 2008 RTM47 - Windows Server 2008 R2
________________________________
Take the system state backup of your schema master then disable the outbound replication and run the forestprep.
Repadmin /options
After getting the success log enable the out bound replication via repadmin.
Repadmin /options
Wait for competing the replication.
Pls see the link also.
You no need to press F8 for logging into DSRM mode for 2008
Enable DSRM Login
bcdedit /set safeboot dsrepair
shutdown -t 0 -r
Disable DSRM login
bcdedit /deletevalue safeboot
shutdown -t 0 –r
bcdedit /set safeboot dsrepair
shutdown -t 0 -r
Disable DSRM login
bcdedit /deletevalue safeboot
shutdown -t 0 –r
First_dc_in_domain_problem
I have found one problem in 2008 (not sure about R2).
below link is for 2003 but I have resolved the same issue on 2008 with the help of below link.
http://www.petri.co.il/first_dc_in_domain_problem.htm
below link is for 2003 but I have resolved the same issue on 2008 with the help of below link.
http://www.petri.co.il/first_dc_in_domain_problem.htm
Subscribe to:
Posts (Atom)