Reset WINS Configuration to DHCP
1 2 wmic /node:PCname process call create 'cmd.exe /c “netsh interface ip set wins name=”Local Area Connection“ source=dhcp”'
12874 users tagging and storing useful source code snippets
Snippets is a public source code repository. Easily build up your personal collection of code snippets, categorize them with tags / keywords, and share them with the world
Scott Lowe http://blog.scottlowe.org
1 2 wmic /node:PCname process call create 'cmd.exe /c “netsh interface ip set wins name=”Local Area Connection“ source=dhcp”'
1 2 wmic /node:PCname process call create 'cmd.exe /c “netsh interface ip set dns name=”Local Area Connection“ source=dhcp”'
1 2 wmic service where (StartName!=“LocalSystem” and StartName!=“NT AUTHORITY\\LocalService” and StartName!=“NT AUTHORITY\\NetworkService”) get Caption,StartName 3
1 2 adfind -b dc=domain,dc=com -f "(&(objectCategory=Person)(objectClass=User)(!userPrincipalName=*))" sAMAccountName -csv > blank-upn-list.csv
1 2 wmic /node:@input.txt /failfast:on nicconfig call SetDNSSuffixSearchOrder (child.domain.com,domain.com,otherdomain.com)
1 2 dsquery * "dc=domain,dc=com" -scope subtree -filter "(&(objectClass=user)(!homeDirectory=*))" -limit 0
1 2 adfind -b dc=domain,dc=com -f "(&(objectCategory=Person)(objectClass=User)(whenCreated>=20061005000000.0Z))" name displayName -csv
1 2 dsquery * dc=domain,dc=com -filter "(&(objectCategory=Person)(objectClass=User)(!userAccountControl:1.2.840.113556.1.4.803:=2))" -limit 0
1 2 logparser -i:ads -o:csv -stats:off "SELECT cn, 3 TO_LOWERCASE(SUBSTR(mail,0,LAST_INDEX_OF(mail,'@'))) as mailPrefix, TO_LOWERCASE(SUBSTR(userPrincipalName,0,LAST_INDEX_OF 4 (userPrincipalName,'@'))) as uPNPrefix 5 FROM 'ldap://dc.domain.com/cn=Users,dc=domain,dc=com' 6 WHERE NOT (mailPrefix = uPNPrefix)" -objClass:user >> output.csv