#1 01 Apr 2014 15:22

goslackware
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:
ss64.com/nt/dsget-subnet.html
technet.microsoft.com/en-us/library/cc732207.aspx
- 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.*
"10.55.130.0/24"

C:\>dsget subnet "10.55.130.0/24"
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.*
"CN=10.55.130.0/24,CN=Subnets,CN=Sites,CN=Configuration,DC=example,DC=com"

C:\>dsget subnet "CN=10.55.130.0/24,CN=Subnets,CN=Sites,CN=Configuration,DC=example,DC=com"
  dn                                                                        desc       site
  CN=10.55.130.0/24,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
  site
  EXAMPLE-MSY
dsget succeeded
---

Offline

#2 02 Apr 2014 01:21

Simon Sheppard
Super Administrator
Registered: 27 Aug 2005
Posts: 873
Website

Re: Incorrect Syntax on "DSGet subnet" Example

fixed now, thanks for the feedback
http://ss64.com/nt/dsget-subnet.html

Offline

Board footer

Powered by FluxBB