- Added
Add-OpenADGroupMemberandRemove-OpenADGroupMemberto manage AD group members - Fixed
Get-OpenADGroupMemberraising an error when the group exists but contains no members, instead it just outputs nothing - Fixed parsing errors for
-LDAPFilterto properly include the parsing error location due to changes in the PowerShell error formatter- PowerShell 7.7+ is required to see the column offsets in the line, but previous versions will still see a slightly less verbose error message
- Remove length check for
sAMAccountNamewhen used in the-Identityparameter - Fix the search base and scope when using
Get-OpenAD*with the-Identityparameter, it should now be possible to find objects not in thedefaultNamingContext
- Raised minimum PowerShell version to 7.4
- Updated
DnsClientto1.8.0for some minor bugfixes - Ensure a failure in a DNS lookup does not stop the module from importing but only errors when the value is used.
- Use a case insensitive lookup for requested properties and the returned LDAP attributes
- Add fallback for Linux/macOS default realm lookup to use the ccache principal realm if present
- Properly store AD sessions in a Runspace specific storage allowing multiple runspaces to run in parallel without affecting each other
- Added the following cmdlets:
- Move-OpenADObject: Moves an AD object to another container
- Rename-OpenADObject: Changes the name of an AD object
- Set-OpenADObject: Sets existing AD objects
- Fix up deadlock when reading the AD schema with an auxiliary class that inherits from
top
- Fix up safe SSPI context handle lifetime handling to avoid process crash
- Moved module code into a separate Assembly Load Context to avoid assembly conflicts for dependencies
- Added the following cmdlets:
- New-OpenADObject: Creates new AD objects
- Remove-OpenADObject: Removes AD objects
- Get-OpenADRootDSE: Get the root directory server information tree
- Fixed up
-LDAPFilterlogic to align the\escaping behaviour with OpenLDAP and theGet-AD*cmdlets- Before a filter with the char
\had to have 2 more chars[A-F0-9]which represented the characters hex value - Now if the
\does not have 2 characters after or they don't match the hex pattern, the\and subsequent values are treated literally
- Before a filter with the char
- Fixed up some binary length calculations for the
PSOpenAD.Securityclasses
- Bumped minimum PowerShell version to 7.2
- Added
Get-OpenADPrincipalGroupMembershipthat returns the groups a principal is a member of - thanks @theaquamarine in #61 - Added SecurityIdentifier properties, methods, and operators by @theaquamarine in #62
- Catch errors from ResolveService() when importing by @theaquamarine in #59
- Improve comments explaining primary group filter by @theaquamarine in #58
- Added
Get-OpenADGroupMemberthat returns members of a group - thanks @theaquamarine
- Fix up case insensitive matching for requested LDAP attributes/properties.
- Fix up
Get-OpenAD*calls where there is no valid metadata to calculate the valid properties. - Minor tweaks to error messages when using an un-authenticated bind.
- Fix up edge case for calculating input LDAP message lengths causing an unpack exception
- Make the AD object properties in a
Get-*operation return with the first character in upper case to fit the PowerShell standard - Validate the requested
-PropertiesonGet-OpenAD*cmdlets are valid for the object class that is being queried- Invalid properties/attributes will result in a pipeling terminating error
- Various fixes to the tab completion of
-PropertiesonGet-OpenAD*- The order will now be in alphabetical order
- Include attributes that are defined on auxiliary types as well as sub types
- Ensures that the
-Propertiesselected onGet-OpenAD*will exist in the output object- If a property was requested but not set on the LDAP object, the property will now be set to
$nullrather than be missing - This is a change from the Microsoft
ActiveDirectorymodule which omits the properties entirely if the attribute did not have a value
- If a property was requested but not set on the LDAP object, the property will now be set to
- Ensure connections that have timed out are not reused causing a deadlock
- Ensure
Get-OpenADUseralso filtered by(objectClass=user)to avoid pulling in contacts
- Added error handling for search request that ends with a referral
- Currently the cmdlet will emit an error record with the referral URI which is similar to what the AD cmdlets do
- Have exceptions in the background recv thread tasks bubble up as inner exceptions to preserve the stack trace for better debugging
- Fix authentication with explicit credential on Windows
- Added
-TracePathtoNew-OpenADSessionOptionto help debug raw LDAP traffice exchanged in a session. - Fix credential prompt when specifying
-Credential my-usernamefor aPSCredentialparameter - Have
Get-OpenADWhoamireturn an object with more details on the LDAP session, like the domain controller DNS name, URI, and authentication method used.- The returned username value will also strip the leading
u:prefix if it is present
- The returned username value will also strip the leading
- Added the
DomainControllerproperty to theOpenADSessionclass to help identify the domain controller the session is connected to - Fixed the default parameter sets of the
Get-OpenAD*cmdlets to always use the default LDAP filter that selects all of that type unless an explicit filter or identity was provided - Added
-ClientCertificatetoNew-OpenADSessionOptionthat is used to authenticate using a client X.509 certificate - Raise
UnpackLDAPMessageExceptionwhen failing to unpack a response from the server.- The exception contains the
LDAPMessageproperty which is the raw byte string that was being unpacked.
- The exception contains the
- Added the
DomainControllerproperty to the results of anyGet-OpenAD*objects to help identify what domain controller returned that information
- Allow using
hostname:portsyntax when using-Serverrather than always requiring the full LDAP URI - Add pagination search control to search requests to retrieve large datasets back from the domain controller
- Fix length calculation bug when parsing an LDAP control on a returned response
- Improve GSSAPI and Kebreros library loading
- Added error messages to describe why PSOpenAD failed to find the implicit DC host
- Change
-UseSSLto-UseTLS - Always add
$to the-IdentityofGet-OpenADComputerandGet-OpenADServiceAccountwhen using asAMAccountName - Fix piping of multiple
-Identityvalues into theGet-OpenAD*cmdlets
- Initial version of the
PSOpenADmodule