Showing posts with label AD tools. Show all posts
Showing posts with label AD tools. Show all posts

Tuesday, May 13, 2008

DSADD Add active directory objects

DSADD.exe (Windows XP)

Add active directory object.

Syntax
DSADD computer
Computer_DN options
DSADD contact
ContactDN options
DSADD group
GroupDN options
DSADD ou
OU_DN organizational_unit_options
DSADD user
User_DN user_options

Key
DN=Distinguished Name(s)
OU=Organisational Unit
Pretty much all the attributes can be modified (Name, display name, tel number etc)
run the command with /? for a full list
e.g
DSADD USER /?

Commas
Commas must be escaped with the backslash \ character
(other than separators in distinguished names)
e.g.
"CN=Company
\, Inc.,CN=Users,DC=ss64,DC=com"

Backslashes
Backslashes used in distinguished names must be escaped with a backslash
(for example,
"CN=Sales
\\ Latin America,OU=Distribution Lists,DC=ss64,DC=com").

If any value contains spaces, use quotation marks:

   "CN=John Smith,CN=Users,DC=SS64,DC=com"

Special Tokens
The token $username$ (case insensitive) may be used to place the SAM account name.
Entering * as a password will cause DSADD to prompt for the new password.

Adding multiple Objects
For any DS command you can enter multiple values separated by spaces.
e.g. to add several user accounts at once just supply a list of the distinguished names separated with spaces.

It is also possible to store multiple values in a text file and redirect into DSADD.

"For a list of all the ways technology has failed to improve the quality of life, press three". - Alice Kahn

Related commands:
dsmod - modify object
dsget - display object
dsmove - move object
dsquery - find object
dsrm - delete object
CSVDE - Import or export AD info in CSV format.
LDIFDE - Edit AD Objects, extend schema, import or export AD information.

Friday, March 28, 2008

DCDiag

DCDiag Syntax

DCDiag uses the following syntax:

dcdiag/s:DomainController [/n:NamingContext] [/u:Domain\UserName /p:{* | Password | ""}] [{/a | /e}] [{/q | /v}] [/i] [/f:LogFile] [/ferr:ErrLog] [/c [/skip:Test]] [/test:Test] [/fix] [{/h | /?}] [/ReplSource:SourceDomainController]

Parameters

/s:DomainController
Uses DomainController as the home server. This parameter is required. It is ignored for DcPromo and RegisterInDns tests which can only be run locally.
/n:NamingContext
Uses NamingContext as the naming context to test. Domains may be specified in NetBIOS, DNS or distinguished name format.
/u:Domain\UserName /p:{* | Password | ""}
Uses Domain\UserNameDCDiag uses the process's or users default credentials. If alternate credentials are needed, use the following options to provide those credentials for binding withPassword as the password. Use "" for an empty or null password, or the wildcard character (*) to prompt for the password.
/a
Tests all the servers on this site.
/e
Tests all the servers in the entire enterprise. Overrides /a.
/q
Quiet. Prints only error messages.
/v
Verbose. Prints extended information.
/i
Ignores superfluous error messages.
/fix
Only affects the MachineAccount test. It causes the test to fix the SPNs (Service Principal Names) on the domain controller's Machine Account Object.
/f:LogFile
Redirects all output to LogFile. The /f parameter operates independently of /ferr.
/ferr:ErrLog
Redirects fatal error output to a separate file ErrLog. The /ferr parameter operates independently of /f.
/c
Comprehensive. Runs all tests except DCPromo and RegisterInDNS, including non-default tests. Optionally, can be used with /skip to skip specified tests. The following tests are not run by default: TopologyCutoffServersOutboundSecureChannels
{ /h | /?}
Displays a syntax screen at the command prompt.
/test:Test
Runs only this test. The nonskippable test Connectivity is also run. Should not be run in the same command with /skip.NoteAll tests except DcPromo and RegisterInDNS must be run on computers that have been promoted to domain controller.The test CheckSecurityError is available only in the version of Dcdiag that is included with Windows Support Tools in Windows Server 2003 Service Pack 1 (SP1) and must be run on a domain controller that is running Windows Server 2003 with SP1.
/ReplSource:SourceDomainController
Option for /test:CheckSecurityError. Tests the connection between the domain controller on which you run the command and the source domain controller. SourceDomainController is the DNS name, NetBIOS name, or distinguished name of a real or potential "from" server that is represented by a real or potential connection object.

DNS Syntax

The new DNS tests in Windows Server 2003 SP1 use the following syntax:

dcdiag /test:DNS [/DnsBasic | /DnsForwarders | /DnsDelegation | /DnsDynamicUpdate |/DnsRecordRegistration | /DnsResolveExtName [/DnsInternetName:InternetName] | /DnsAll] [/f:LogFile] [/ferr:ErrLog] /s:DomainController [/e] [/v]

Parameters

/test:DNS [DNS test]
Performs the specified DNS test. If no test is specified, defaults to /DnsAll.
/DnsBasic
Performs basic DNS tests, including network connectivity, DNS client configuration, service availability, and zone existence.
/DnsForwarders
Performs the /DnsBasic tests, and also checks the configuration of forwarders.
/DnsDelegation
Performs the /DnsBasic tests, and also checks for proper delegations.
/DnsDynamicUpdate
Performs /DnsBasic tests, and also determines if dynamic update is enabled in the Active Directory zone.
/DnsRecordRegistration
Performs the /DnsBasic tests, and also checks if the address (A), canonical name (CNAME) and well-known service (SRV) resource records are registered. In addition, creates an inventory report based on the test results.
/DnsResolveExtName [/DnsInternetName:InternetName]
Performs the /DnsBasic tests, and also attempts to resolve InternetName. If/DnsInternetName is not specified, attempts to resolve the name www.microsoft.com. If/DnsInternetName is specified, attempts to resolve the Internet name supplied by the user.
/DnsAll
Performs all tests, except for the DnsResolveExtName test, and generates a report.
/f:LogFile
Redirects all output to LogFile. The /f parameter operates independently of /ferr.
/ferr:ErrLog
Redirects fatal error output to a separate file ErrLog. The /ferr parameter operates independently of /f.
/s:DomainController
Runs the tests against DomainController.
/e
Runs all tests specified by /test:DNS against all domain controllers in the Active Directory forest.
/v
Verbose. Presents extended information about successful test results, in addition to information about errors and warnings. When the /v parameter is not used, provides only error and warning information. Use the /v switch when errors or warnings are reported in the summary table.
 
Site Meter