Never been to DZone Snippets before?

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

« Newer Snippets
Older Snippets »
Showing 1-4 of 4 total  RSS 

Reset WINS Configuration to DHCP

Resets the WINS configuration on the specified remote PC (per the /node:PCname parameter) to obtain WINS addresses from DHCP

wmic /node:PCname process call create 'cmd.exe /c “netsh interface ip set wins name=”Local Area Connection“ source=dhcp”'

Reset DNS Configuration to DHCP

Resets the DNS configuration on the specified remote PC (per the /node:PCname parameter) to obtain DNS addresses from DHCP

wmic /node:PCname process call create 'cmd.exe /c “netsh interface ip set dns name=”Local Area Connection“ source=dhcp”'

Listing Services Running As a User Account

Lists all services that are running as a user account (not running as LocalSystem, LocalService, or NetworkService)

wmic service where (StartName!=“LocalSystem” and StartName!=“NT AUTHORITY\\LocalService” and StartName!=“NT AUTHORITY\\NetworkService”) get Caption,StartName

Set DNS Suffix Search Order Remotely

Uses WMIC to connect to a list of computers in an input file (one computer name per line) and sets the DNS suffix search order

wmic /node:@input.txt /failfast:on nicconfig call SetDNSSuffixSearchOrder (child.domain.com,domain.com,otherdomain.com)
« Newer Snippets
Older Snippets »
Showing 1-4 of 4 total  RSS