Where are the resources from DNSServerDSC for the Records?
brwilkinson opened this issue · 10 comments
Get-Module DNSServerDSC -ListAvailable
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 3.0.1 preview0002 DnsServerDsc Desk
I only see the following?
Get-DscResource -Module DNSServerDSC | foreach Name
DnsServerADZone
DnsServerClientSubnet
DnsServerConditionalForwarder
DnsServerDiagnostics
DnsServerForwarder
DnsServerPrimaryZone
DnsServerRootHint
DnsServerSecondaryZone
DnsServerSetting
DnsServerSettingLegacy
DnsServerZoneAging
DnsServerZoneScope
DnsServerZoneTransfer
hmmm I guess they are there somewhere, haven't found where as yet :)
gmo DnsServerDsc -ListAvailable | foreach ExportedDscResources
DnsRecordCname
DnsRecordPtr
DnsRecordA
DnsRecordAaaa
DnsRecordCnameScoped
DnsRecordMx
DnsRecordNs
DnsRecordSrv
DnsServerCache
DnsServerDsSetting
DnsServerEDns
DnsServerRecursion
DnsServerScavenging
DnsRecordAaaaScoped
DnsRecordAScoped
DnsRecordMxScoped
DnsRecordNsScoped
DnsRecordSrvScoped
DnsServerADZone
DnsServerClientSubnet
DnsServerConditionalForwarder
DnsServerDiagnostics
DnsServerForwarder
DnsServerPrimaryZone
DnsServerRootHint
DnsServerSecondaryZone
DnsServerSetting
DnsServerSettingLegacy
DnsServerZoneAging
DnsServerZoneScope
DnsServerZoneTransfe
This is a bug in Get-DscResource
in PowerShell 7. If you use PowerShell 5.1 they will show using Get-DscResource
.
Thanks @johlju
Assume this is an issue reading the Class based resources from the Module then?
--
Powershell 7 - broken
gmo psdesiredstateconfiguration -list | ft -auto
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 2.0.5 PSDesiredStateConfiguration Core {Configuration, New-DscChecksum, Get-DscResource, Invoke-DscResource}
Powershell 7 - broken
gmo psdesiredstateconfiguration -list | ft -auto
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version PreRelease Name PSEdition ExportedCommands
---------- ------- ---------- ---- --------- ----------------
Script 3.0.0 beta1 PSDesiredStateConfiguration Core {Configuration, New-DscChecksum, Get-DscResource, Invoke-DscResource…}
PowerShell 5 - works.
ipmo $pshome\modules\psdesiredstateconfiguration
Get-DscResource -Module DNSServerDSC | foreach Name
DnsRecordA
DnsRecordAaaa
DnsRecordAaaaScoped
DnsRecordAScoped
DnsRecordCname
DnsRecordCnameScoped
DnsRecordMx
DnsRecordMxScoped
DnsRecordNs
DnsRecordNsScoped
DnsRecordPtr
DnsRecordSrv
DnsRecordSrvScoped
DnsServerADZone
DnsServerCache
DnsServerClientSubnet
DnsServerConditionalForwarder
DnsServerDiagnostics
DnsServerDsSetting
DnsServerEDns
DnsServerForwarder
DnsServerPrimaryZone
DnsServerRecursion
DnsServerRootHint
DnsServerScavenging
DnsServerSecondaryZone
DnsServerSetting
DnsServerSettingLegacy
DnsServerZoneAging
DnsServerZoneScope
DnsServerZoneTransfer
I have not yet tried running resources through PS7 with the latest preview of PSDesiredStateConfiguration. Not sure the work is finished to be able to run in PS7 🤔
Hey @brwilkinson, not sure what's your version of pwsh, but the PSDSC module 3.0.0-beta has to run on pwsh 7.2.preview.5 or above iirc.
Previous versions had some issues with Class based DSC Resources, especially when inheritence was used (which I just guess that's the case in this module).
Next DSC Community call will be with Andrew and Steve from the PowerShell team to discuss all the changes that is happening with those versions.
Ping me if you try and you have the same error with the latest pwsh preview and PSDSC beta. Thanks! :)
I do run preview. This is not a blocker for me right now, so I can wait to hear about any updates or upcoming releases.
$PSVersionTable
Name Value
---- -----
PSVersion 7.2.0-preview.9
Anyone have any updates to share or else I have some bandwidth now to follow up?
Labeling this as external as we cannot solve this in this module.
Come and ask the question during the DSC Community call on Wednesday, Steve Lee & Andrew should be there discussing recent changes to PS DSC.
Closing this issue since we cannot fix this in this module. We will keep it pinned in the issue section so other users find it more easily. We still wait for PS Team to release something that can be (easily) used to run class-based resources in PS7 (that is not in preview).