Install Optional Features to enable RSAT for Active Directory, reboot, then run PSCore6 and test AD cmdlets by doing "Get-ADUser _username_" - this should show you your NT acct details. If that does work without issue (indicating the modules loaded as expected) you can reproduce my error by running
Get-ADUser _username_ -Properties *
You should get an export of all your AD acct properties like below (taken from Windows Powershell - which works as expected)
PS C:Usersnmyron> $PSVersionTable
Name Value
---- -----
PSVersion 6.2.1
PSEdition Core
GitCommitId 6.2.1
OS Microsoft Windows 10.0.18362
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0鈥
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Yeah, this is a known issue with the types backing the AD commands. I don't have the link handy right now, but it's been looked at, and I believe there were some regressions in .NET Core that needed to be patched. From memory, it should be functional within a few more preview releases of .NET Core (I think they ballparked it at preview8 of .NET Core 3).
I think @corbob might know where that issue thread was at, it was in either the AD commands repo or the .NET Core repo...
Well, it was an adventure learning about GitHub searching and such. It's over here: https://github.com/PowerShell/PowerShellModuleCoverage/issues/5 including a workaround if you're so inclined.
@corbob Thanks for the reference.
Latest daily PowerShell 7.0 is based on .Net Core 3.0 so I expect the issue is gone. Please confirm.
Not sure that fix has made it all the way here yet. It was merged to net core, but I think that was after preview6 of .net core 3 (which is the current one we're building on if I recall correctly?)
@bergmeister has a branch where he's building against a more recent version of .net core 3, so he may be able to check if it's still an issue and confirm. If not, I'll give it another look when his PR is merged :)
You can try using the build of PR #9888, which updates .net core from preview 5 to 6 and more importantly the out of band nuget packages that are still on 2.1 for 7.0-preview1 of pwsh
hi to all.
still have same issue PowerShell 7.0.0-preview.2
I just had a dig at the underlying issue in .Net Core that causes this: https://github.com/dotnet/corefx/issues/34151
The following PR fixed this: https://github.com/dotnet/corefx/pull/38283
However, the PR was merged on June the 6th and it seems at that time .Net Core 3.0 Preview6 (released on June the 12th) had already branched off at that point and therefore it did not make it into Preview6, which PowerShell 7.0.0-preview.2
uses now. I expect .Net Core to release preview 7 in the next days or weeks, which has this fix, meaning it will likely be in PowerShell 7.0.0-preview.3
P.S. I've manually tested that the recently published preview7
actually fixed this The upgrade of the .Net Core runtime to preview7 will happen in PR #10227, which I expect to be part of 7.0-preview3
:tada:This issue was addressed in #10227, which has now been successfully released as v7.0.0-preview.3
.:tada:
Handy links:
Most helpful comment
I just had a dig at the underlying issue in .Net Core that causes this: https://github.com/dotnet/corefx/issues/34151
The following PR fixed this: https://github.com/dotnet/corefx/pull/38283
However, the PR was merged on June the 6th and it seems at that time .Net Core 3.0 Preview6 (released on June the 12th) had already branched off at that point and therefore it did not make it into Preview6, which
PowerShell 7.0.0-preview.2
uses now. I expect .Net Core to release preview 7 in the next days or weeks, which has this fix, meaning it will likely be inPowerShell 7.0.0-preview.3