Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DnsServerSetting: The property ServerLevelPluginDll cannot be set to $null or empty string #259

Open
johlju opened this issue May 22, 2021 · 2 comments
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.

Comments

@johlju
Copy link
Member

johlju commented May 22, 2021

Details of the scenario you tried and the problem that is occurring

There is a problem with the property ServerLevelPluginDll as it is not possible to revert the setting to not point to a .dll once it has been set. This migh be either an issue with the cmdlet Set-DnsServerSetting or there is a way to set this that is unknown to me.

Verbose logs showing the problem

PS > $a = Get-DnsServerSetting  -All
PS > $a.ServerLevelPluginDll = 'c:\temp\plugin.dll'
PS > $a | Set-DnsServerSetting
PS > $a = Get-DnsServerSetting  -All
PS > $a.ServerLevelPluginDll
c:\temp\plugin.dll
PS > $a.ServerLevelPluginDll = ''
PS > $a | Set-DnsServerSetting
PS > $a = Get-DnsServerSetting  -All
PS > $a.ServerLevelPluginDll
c:\temp\plugin.dll
PS > $a.ServerLevelPluginDll = $null
PS > $a | Set-DnsServerSetting
PS > $a = Get-DnsServerSetting  -All
PS > $a.ServerLevelPluginDll
c:\temp\plugin.dll
### Suggested solution to the issue
Unknown.

### The DSC configuration that is used to reproduce the issue (as detailed as possible)
Not applicable.

### The operating system the target node is running

OsName : Microsoft Windows Server 2016 Standard
OsOperatingSystemSKU : StandardServerEdition
OsArchitecture : 64-bit
WindowsBuildLabEx : 14393.4283.amd64fre.rs1_release.210303-1802
OsLanguage : en-US
OsMuiLanguages : {en-US}


### Version and build of PowerShell the target node is running

Name Value


PSVersion 5.1.14393.3866
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.3866
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1


### Version of the DSC module that was used
3.0.0
@johlju johlju added bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community. labels May 22, 2021
@johlju
Copy link
Member Author

johlju commented May 22, 2021

It says here it should be set to an emtpy string

ServerLevelPluginDll: An absolute pathname of a dynamic link library that the DNS server can use to resolve unknown names, or an empty string to remove or disable the previously selected DLL. This protocol only treats the pathname as a string, it does not constrain the syntax in any way. This property is encoded as a null-terminated Unicode string, and the type ID for this property is DNSSRV_TYPEID_LPWSTR, listed in section 2.2.1.1.1.
https://docs.microsoft.com/en-us/openspecs/windows_protocols/ms-dnsp/c9d38538-8827-44e6-aa5e-022a016ed723

@johlju
Copy link
Member Author

johlju commented May 22, 2021

Maybe we have to workaround it by using dnscmd /config and the argument /serverlevelplugindll with no value.
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/dnscmd#dnscmd-config-command

PS > $a = Get-DnsServerSetting  -All
PS > $a.ServerLevelPluginDll = 'c:\temp\plugin.dll'
PS > $a | Set-DnsServerSetting
PS > $a = Get-DnsServerSetting  -All
PS > $a.ServerLevelPluginDll
c:\temp\plugin.dll
PS > dnscmd /config /serverlevelplugindll

Registry property serverlevelplugindll successfully reset.
Command completed successfully.

PS > $a = Get-DnsServerSetting  -All
WARNING: EnableRegistryBoot not applicable on DNS Server SQLTEST3 version.
PS > $a.ServerLevelPluginDll
PS >

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug The issue is a bug. help wanted The issue is up for grabs for anyone in the community.
Projects
None yet
Development

No branches or pull requests

1 participant