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

Where are the resources from DNSServerDSC for the Records? #268

Closed
brwilkinson opened this issue Sep 11, 2021 · 10 comments
Closed

Where are the resources from DNSServerDSC for the Records? #268

brwilkinson opened this issue Sep 11, 2021 · 10 comments
Labels
external The issue cannot be resolved within this repository.

Comments

@brwilkinson
Copy link

brwilkinson commented Sep 11, 2021

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
@brwilkinson
Copy link
Author

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

@johlju
Copy link
Member

johlju commented Sep 13, 2021

This is a bug in Get-DscResource in PowerShell 7. If you use PowerShell 5.1 they will show using Get-DscResource.

@johlju johlju pinned this issue Sep 13, 2021
@johlju johlju added the question The issue is a question. label Sep 13, 2021
@brwilkinson
Copy link
Author

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

@johlju
Copy link
Member

johlju commented Sep 13, 2021

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 🤔

@gaelcolas
Copy link
Member

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! :)

@brwilkinson
Copy link
Author

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

@brwilkinson
Copy link
Author

Anyone have any updates to share or else I have some bandwidth now to follow up?

@johlju johlju added external The issue cannot be resolved within this repository. and removed question The issue is a question. labels Oct 2, 2021
@johlju
Copy link
Member

johlju commented Oct 2, 2021

Labeling this as external as we cannot solve this in this module.

@gaelcolas
Copy link
Member

Come and ask the question during the DSC Community call on Wednesday, Steve Lee & Andrew should be there discussing recent changes to PS DSC.

@johlju
Copy link
Member

johlju commented Jan 11, 2023

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).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
external The issue cannot be resolved within this repository.
Projects
None yet
Development

No branches or pull requests

3 participants