#1 01 Apr 2014 15:22

New Member
Registered: 01 Apr 2014
Posts: 1

Incorrect Syntax on "DSGet subnet" Example

Both of these pages have an incorrect syntax for the "DSGet subnet" example:
- I've also submitted feedback to microsoft to fix their page on technet.

The syntax in the examples on both of the above pages incorrectly uses the "SubnetRDN", instead of the "SubnetDN". 
Please fix and update page's example.
Example using "SubnetRDN" (this will give an error):
C:\>dsquery subnet -o rdn -name 10.55.130.*

C:\>dsget subnet ""
dsget failed:Value for 'Target object for this command' has incorrect format.
type dsget /? for help.
# Notice that passing the SubnetRDN gives an "incorrect format" error.
# Also notice that the syntax says "DSGET Subnet SubnetDN", NOT the "SubnetRDN"
Example using the "SubnetDN" (this will work)
C:\>dsquery subnet -name 10.55.130.*

C:\>dsget subnet "CN=,CN=Subnets,CN=Sites,CN=Configuration,DC=example,DC=com"
  dn                                                                        desc       site
  CN=,CN=Subnets,CN=Sites,CN=Configuration,DC=example,DC=com    EXAMPLECR    EXAMPLE-MSY
dsget succeeded
Example having dsquery piped to dsget (this will work and is a "oneliner"):
C:\>dsquery subnet -name 10.55.130.* | dsget subnet -site
dsget succeeded


#2 02 Apr 2014 01:21

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 1,108

Re: Incorrect Syntax on "DSGet subnet" Example

fixed now, thanks for the feedback


Board footer

Powered by FluxBB