Friday, November 11, 2011

Active Directory: Active Directory Domain Services (AD DS) Commands and Scripts

I have updated the “Active Directory: Active Directory Domain Services (AD DS) Commands and Scripts” TechNet Wiki article with more DS commands. Feel free to update/modify this article.  http://social.technet.microsoft.com/wiki/contents/articles/3537.aspx
User

Identify OCS enabled users in Active Directory

Dsquery * -filter (msRTCSIP-UserEnabled=TRUE) –limit 0 –attr name samaccountname

Query Password Last Set (pwdlastset) value

dsquery * -filter "&(objectClass=User)(objectCategory=Person)" -limit 0 -attr name pwdlastset

Note: Time can be convered using the w32tm /ntte command.

Search Password Never Expires Settings

Dsquery * -limit 0 “(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=65536))” –attr samaccoutname name

Password Expiring in 30 Days

dsquery * -limit 0 -filter "(&(objectCategory=person)(objectClass=user)(userAccountControl:1.2.840.113556.1.4.803:=4194304))" -attr name samaccountname

User accounts with “Do not require kerberos preauthentication” enabled

Dsquery * -limit 0 “(&(objectCategory=person)(objectClass=user)(!userAccountControl:1.2.840.113556.1.4.803:=8388608)(!userAccountControl:1.2.840.113556.1.4.803:=65536)(pwdLastSet>=129522420000000000)(pwdLastSet<=129548340000000000))” –attr samaccountname name

List all Roaming Profile users in Active Directory

dsquery * -filter "&(objectClass=User)(objectCategory=Person)(profilePath=*)" -limit 0 -name

Generate SIDHistory Report

dsquery * -filter "&(objectClass=User)(objectCategory=Person)" –attr samAccountName sidHistory

Generate SID (ObjectSID) Report

dsquery * -filter "&(objectClass=User)(objectCategory=Person)" –attr samAccountName Object

Group

Identify all Security Groups

dsquery * -filter "(&(objectCategory=group)
(groupType:1.2.840.113556.1.4.804:=2147483648))" –attr samAccountName name

Identify all Built-In Security Groups

dsquery * -filter "(&(objectCategory=group)
(groupType:1.2.840.113556.1.4.803:=2147483649))" –attr samAccountName name

Identify all Universal Security Groups

dsquery * -filter "(&(objectCategory=group)
(groupType:1.2.840.113556.1.4.803:=2147483656))" –attr samAccountName name

Identify all Gloabl Security Groups

dsquery * -filter "(&(objectCategory=group)
(groupType:1.2.840.113556.1.4.803:=2147483650))" –attr samAccountName name

Computer

Move Computer Objects Based on OS Version

Move Widnows 7 Computers

dsquery * CN=Computers,DC=santhosh,DC=lab -filter "(&(ObjectClass=computer)(objectCategory=Computer)(operatingSystemVersion=6.1))" | dsmove -newparent OU=Win7,OU=ComputerAccounts,DC=santhosh,DC=lab

Move Windows XP Computers

dsquery * CN=Computers,DC=santhosh,DC=lab -filter "(&(ObjectClass=computer)(objectCategory=Computer)(operatingSystemVersion=5.1))" | dsmove -newparent OU=WinXP,OU=ComputerAccounts,DC=santhosh,DC=lab

Domain Controller

 

Site and Subnet

List all Sites in Active Directory

Dsquery site * -name

Get Site Name from Subnet IP Address in Active Directory (For example, Site Name for Subnet 192.168.2.0/24)

Dsquery Subnet -Name 192.168.2.0/24 | Dsget Subnet -Site

31 comments:

Here are some argumentative essay tips for you, guys. Use them wisely!

Your blog is very informative and helpful for me. I am really excited to find this post. I am so happy to find this post. Are you ready Halloween in game sims 4 skill cheats ? Dress your sims up in spooktacular costumer and build the perfedct haunted house with configurable stair.

Udaipur Escort Service Experience With Great Call Girls
At Udaipur Escorts there also are many Sexual models. However, these aren't always easy to seek out .It's easy with the agency side escort Udaipur. There you'll determine about call girls in Udaipur.
Udaipur Escorts services
Udaipur Escorts

The girls who are housewives but also serving as the Housewife Call Girls to the clients and this time the maturity goes on the highest scale for you with the booking of these call girls. Due to the top maturity sense and knowledge of sex moves these girls are most demanded in the list.
Mumbai Escorts
Mumbai Call Girls
Church Gate Escorts

Mumbai‌ ‌Call‌ ‌Girls ‌have‌ ‌good‌ ‌features‌ ‌of‌ ‌relationships‌ and‌ ‌the‌ ‌call‌ ‌girls‌ ‌are‌ ‌performing‌ ‌in‌ ‌the‌ ‌right‌ ‌manner‌ ‌when‌ ‌they‌ ‌choose‌ ‌the‌ ‌right‌ ‌bunch‌ ‌of‌ ‌services.
Mumbai Escorts
Mumbai Call Girls
Chembur Escorts

The team of our gurgaon escort service provides a 24-hour service and interview and personally trains all the women who collaborate with us. We regularly visit escort locations to make sure the ladies' apartment is luxurious enough and tailored to the needs of our clients. We only deal with serious and educated girls who are not only stunning women with a great body, but also kind, friendly and with a big heart.
gurgaon escorts
Udaipur escorts
jodhpur escorts
ajmer escorts
jaipur escorts

Hire cheap and vivacious escorts in nainital to receive endless entertainment of the end times and lie back in their faithful arms. We are glad that you are showing enthusiasm for hot college girls in nainital. As you will see, escorts in nainital are beautiful and to satisfy them, you just need to call them.
Nainital escorts
haldwani escorts
rudrapur escorts
ramnagar escorts

Many people do not experience what nainital independent escorts are all about and how helpful they will be in unexpected positions. Are you on the hunt for an exquisite, beautiful and high class escorts number in nainital? Our nainital escorts photo meets all the standards of your requirements, from foreign models to Airhostess celebrities.
nainital escorts
haldwani escorts
ramnagar escorts
rudrapur escorts

Babes of jaipur is hiring hot women to join our fun loving team. If you have that special touch of beauty and enjoy connecting with new people, we would love to meet you. Please take a minute to fill out our jaipur escorts agency employment form, with as much detail as possible, and we will get in touch.
jaipur escorts
ajmer escorts
udaipur escorts
jodhpur escorts
pushkar escorts
Udaipur escorts

you have found our Gallery of Angels! This is the place to be when looking for a sexy escort in udaipur. As you can see, it is possible to search for your ideal udaipur escorts. From body type to hair colour and price to location, there is no reason why you can't find the perfect udaipur escort for you.
udaipur escorts
Jodhpur escorts
nainital escorts
ajmer escorts

To brighten your mood, it is possible to hire busty couples and feel hot and sensational. All men want to enjoy their mood with awesome people and make love with their body. To surprise yourself and excite your innermost sexual desires, consider hiring our beautiful escorts in gurgaon.
Gurgaon escorts
manesar escorts
surajkund escorts
iffco chowk escorts
alwar escorts
bhiwadi escorts
rewari escorts

The 100 GPD P Flow Pump also comes with a resistant finishing for enhancing the durability of the complete RO Machine.
100 GPD RO Booster Pump

Escort Service in Gurgaon are independent tours Gurgaon Escort have been placed in the categories of you can contact on our website to spend time with them.Escort Service in Gurgaon

Our female dehradun escort mates are happy to please and content, and they have everything a lusty woman needs. dehradun is the best city to find high-quality escort services. dehradun is one of the most well-known business centres in the world. It is also the perfect place to enjoy the dehradun escorts. Our dehradun escort services are available to entertain you at your convenience and provide unforgettable pleasure. Enjoy amazing time with them and fulfill your desires. Romantic dehradun escort girl know how to provide their sexual pleasure to their companions and make them feel amazing.
dehradun escort service
haridwar escort service
rishikesh escort service
mussoorie escort service
nainital escort service
haldwani escort service
ramnagar escort service
rudrapur escort service

Our agency is known for working with the most elite nainital escorts. We also have the largest selection of profiles for the ladies in our pool. No matter what profile you choose for nainital escort service, we will provide the most relevant solutions to your needs and decisions. You'll have a wonderful and unique experience with us.
nainital escort service
haldwani escort service
ramnagar escort service
rudrapur escort service

The escorts offer support to customers in the simplest way hyderabad escorts can. These escorts in hyderabad are responsible for providing the best service and protection. They do not take any extra care to provide a high-quality, charitable service for their clients. Independent luxury hyderabad escorts are always in high demand in hyderabad. Many girls think they are high-quality independent hyderabad escorts.
hyderabad escort service
goa escort service
Udaipur escort service

Post a Comment

Popular Posts

Share

Twitter Delicious Facebook Digg Stumbleupon Favorites More