Skip to content
This repository was archived by the owner on Jun 12, 2023. It is now read-only.
This repository was archived by the owner on Jun 12, 2023. It is now read-only.

-Properties parameter in ActiveDirectory module cmdlets doesn't accept value "*" #5

@sethvs

Description

@sethvs

-Properties parameter in ActiveDirectory module cmdlets (Get-ADUser, Get-ADComputer, Get-ADObject, etc.) doesn't accept value "*" when invoked from PowerShell Core 6.1 on Windows 10 1809.
It works in Windows PowerShell 5.1.

Steps to reproduce

Windows PowerShell 5.1

[5.1] PS C:\> Get-ADUser someuser -Properties *
AccountExpirationDate                : somevalue
accountExpires                       : somevalue
AccountLockoutTime                   : somevalue
AccountNotDelegated                  : somevalue
adminCount                           : somevalue
AllowReversiblePasswordEncryption    : somevalue
...

PowerShell Core 6.1

[6.1.0] PS C:\> Get-ADUser someuser -Properties *
Get-ADUser : Object reference not set to an instance of an object.
At line:1 char:1
+ Get-ADUser someuser -Properties *
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (someuser:ADUser) [Get-ADUser], NullReferenceException
+ FullyQualifiedErrorId : ActiveDirectoryCmdlet:System.NullReferenceException,Microsoft.ActiveDirectory.Management.Commands.GetADUser

Expected behavior

Return all properties of the object, as it is in Windows PowerShell 5.1.

Actual behavior

Returns error message.

Environment data

> $PSVersionTable

Name                           Value
----                           -----
PSVersion                      6.1.0
PSEdition                      Core
GitCommitId                    6.1.0
OS                             Microsoft Windows 10.0.17763
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions