The goal of this scripting exercise was to get quick information about the IPv6 Adapterconfigurations in my test-domain. In these last scripts I’m using WSMAN.
Wsman takes care of the initiation of the remote object, in this case the adapterconfiguration. The data received is in XML format. All those configurations are collected in the $items collection.
But at first I have to detect the domain computers, the hostname and the domain name. Thanks to Chrissy Lemaire I found the most simple solution for the hostname and the domainname. Powershell takes care of that and puts those names in the $env: environment.
For the domaincomputers I used the DirectorySearcher. It’ s one of the beautiful things of the Powershell that if you don’t know anything about an object, you just have to use Get-Member and you instantly know all you have to know about the object you are investigating.
So $DirectorySearcher | gm gives you a fair idea of what can be done with the searcher. I’ve put the AD functions in the Functions_AD.ps1 file.
The Wsman_AdapterConfig.ps1 file gathers the NetworkAdapterConfigurations in the $items collection,; the first time just to get the properties in order to create the labels in the form. In the script Wsman_AdapterConfig_GUI.ps1 I recall this script again with the selected engine as parameter to get the configurations and to fill in the correct values in the textboxes.
You can find the Powershell Scripts in the blogpost04.zip file in the download section.