Author Posts

July 24, 2018 at 9:41 am

Hello all,
I have just started learning more about DSC and started to read Don's book 'The DSC book'
early on in the book it says if you want to install AD for example you would use DSC cope like

WindowsFeature AD {
Name = "ADDS"
Ensure = "Present"
}

The thing I do not understand is although names like AD and ADDS are obvious to me (referring to Active Directory), how does the computer know you want to install AD for the following reasons

1) why are the handles (names) used to refer to AD different in the above example e.g. AD and ADDS and which of these does Windows use internally to identify the fact you want to install AD, for example would the following work

WindowsFeature ADDS {
Name = "ADDS"
Ensure = "Present"
}

or

WindowsFeature AD {
Name = "AD"
Ensure = "Present"
}

As having two names to refer to the same thing just add unnecessary confusion (e.g. which to use there as above)

Also if you look at Get-WindowsFeature on a DC is lists AD as follows

Display Name Name Install State
———— —- ————-
[X] Active Directory Domain Services AD-Domain-Services Installed

above the 'name' is AD-Domain-Services not AD or ADDS and also the display name is 'Active Directory Domain Services' again not AD or ADDS

So this is all a bit confusing, the only place the words ADDS show up on the DC in is the Server Manager GUI under 'roles and server groups' but with a space in the name e.g. AD DS

So we have at least 5 different names to refer to the same thing AD, ADDS, AD DS, AD-Domain-Services and Active Directory Domain Services

So how are you supposed to know which name to use in your DDC code ? and can I use the same name in the DSC code as above e.g.

WindowsFeature ADDS {
Name = "ADDS"
Ensure = "Present"
}

I realise AD has several components DS, CS, FD is that why the feature name is AD and the Name is ADDS so if I wanted to install AD CS I would use the following ?

WindowsFeature AD {
Name = "ADCS"
Ensure = "Present"
}

The bottom line for me is how can I (or anyone else) work out the correct text for my DCS code as above when cmdlets like Get-WindowsFearture to not show AD or ADDS

Thanks all
Ed

July 24, 2018 at 1:43 pm

AD as a brand name refers to many things. ADDS, ADFS, ADAM, etc. use Get-WindowsFeature to see the list of internal feature names.

July 24, 2018 at 2:00 pm

Jeez, apologies – my mail client cut off most of your post.

So, for better or for worse, this isn't really a PowerShell or DSC thing, it's how Windows Features was built under the hood. The "handles" are the same ones DISM would use, for example; PowerShell just inherits the underlying technology. And yes, some of them have aliases, like ADDS for AD-Domain-Services. You can always use the official handle exposed by Get-WindowsFeature.

So we have at least 5 different names to refer to the same thing AD, ADDS, AD DS, AD-Domain-Services and Active Directory Domain Services

Well, no, we don't. You as a human might use "Active Directory Domain Services," but DISM doesn't permit spaces, so that and "AD DS" have never been options there. That's extremely common in computing – the "display name" a human might see is often different from the "real" name the computer uses. Processes and services have always been the same thing – the service is "Dns.exe" not "Microsoft Windows DNS Service.exe." Think of "AD-Domain-Services" as the "filename" for the feature. And as you noted, "AD" has never been a "feature" name in DISM times; it's a brand that refers to multiple things.

July 26, 2018 at 9:48 pm

Thanks Don,

So to clarify, if I am not sure of the name to use, I am always use get-WindowsFeature (for the windows feature provider) and user the value returned by the 'name' attribute like AD-Domain-Services in other words in the example that uses ADDS I could of also used AD-Domain-Services ?

Thanks very much
Ed

July 26, 2018 at 9:49 pm

Basically, yeah.