Closed rmbolger closed 3 years ago
Hi @rmbolger Do you have some code we can use to reproduce the problem?
I just pushed my WIP branch of the module up to Github here. You should be able to just dot source the Windows.ps1 plugin file directly rather than futzing with the rest of the module. I can also try putting together a smaller repro if you'd like.
Here's an example command that works for me from Windows PS, but gets the serialization error from PS Core (since upgraded to 6.0.2). The DNS server in this case is remote and standalone, but using a valid cert for WinRM. Explicit credentials and -WinUseSSL
may not be necessary if client and server are in the same AD domain.
Add-DnsTxtWindows 'test.example.com' 'myvalue' 'dns-server.example.com' (Get-Credential) -WinUseSSL
Hello @rmbolger, have u been able to solve this issue please?
P.
I never ended up solving it in PowerShell 6. But it seems to have been solved for me in PowerShell 7.
First off, thank you all for trying to solve this usability gap while we wait for all of the Win modules we depend on to get ported to Core. Fantastic effort!
I have a module that has a plugin system for interacting with various DNS servers/services. The Windows DNS plugin relies on the DnsServer module that doesn't have a Core compatible version yet. So I figured I'd try to add support for it on Core via this lovely module.
I've got
WindowsCompatibility
installed and functional which is to say I can runImport-WinModule DnsServer
successfully. But I'm running into problems with DnsServer's dependence on CimSession objects.The plugin code appears to create a
New-CimSession
against the DNS server successfully. But when I try to run a function and reference the CimSession object, I get the following error.At first, I thought this might be because Core has its own version of
CimCmdlets
and sending the locally created CimSession object through the implicit remoting connection was screwing things up. So I tried explicitly loading the WindowsCimCmdlets
module viaImport-WinModule
as well. But that ended up with a different error when callingNew-CimSession
.I'm running this all from Win 10 1803. Here's the output of my Win PS and PS Core
$PSVersionTable
variables.