Dropping support for PowerShell 6. PowerShell 7 and Windows PowerShell 5.1 are still supported.
Under Microsoft patterns and practices, an "identity" is user account and a "principal" is a user or group account.
We're updating Carbon.Accounts to follow this pattern by replacing Identity
with Principal
in function and class
names, and error messages.
- Rename usages of function
Resolve-CIdentity
toResolve-CPrincipal
. - Rename usages of function
Resolve-CIdentityName
toResolve-CPrincipalName
. - Rename usages of function
Test-CIdentity
toTest-CPrincipal
. - Rename usages of class
Carbon_Accounts_Identity
toCarbon_Accounts_Principal
. - Rename usages of enum
Carbon_Accounts_Identity_Type
toCarbon_Accounts_Principal_Type
.
If migrating from Carbon's group functions (Add-CGroupMember
, Get-CGroup
, Install-CGroup
, Remove-CGroupMember
,
Test-CGroup
, Test-CGroupMember
, and Uninstall-CGroup
):
- Functions re-written to use PowerShell's built-in
Microsoft.PowerShell.LocalAccounts
module so they do not support running under 32-bit PowerShell on a 64-bit operating system. - Rename usages of
Install-CGroup
,Add-CGroupMember
, andRemove-CGroupMember
function'sMembers
parameter toMember
. - Remove usages of
Install-CGroup
function'sPassThru
switch. UseGet-LocalGroup
instead. - Rename usages of
Test-CGroupMember
function'sGroupName
parameter toName
. Install-CGroup
andAdd-CGroupMember
no longer support adding a local group to a group and writes an error instead. Previously, local built-in groups were allowed to be added because the underlying Windows API allowed them, but functionally, Windows ignores local groups in a local group. Review usages. To check if a group is a local group, useResolve-CPrincipal
and if theType
property on the returned object isAlias
and the group is not a domain group, it will cause an error.- Rename usages of
Add-CGroupMember
toInstall-CLocalGroupMember
. - Rename usages of
Get-CGroup
toGet-CLocalGroup
. - Rename usages of
Install-CGroup
toInstall-CLocalGroup
. - Rename usages of
Remove-CGroupMember
toUninstall-CLocalGroupMember
. - Rename usages of
Test-CGroup
toTest-CLocalGroup
. - Rename usages of
Test-CGroupMember
toTest-CLocalGroupMember
. - Rename usages of
Uninstall-CGroup
toUninstall-CLocalGroup
.
Get-CLocalGroup
for getting local groups. Has support for non-wildcard lookups.Get-CLocalGroupMember
for getting local group members.Install-CLocalGroup
for installing local groups.Install-CLocalGroupMember
for adding accounts to local groups.Test-CLocalGroup
for testing if local groups exist.Test-CLocalGroupMember
for testing if accounts are in a local group.Uninstall-CGroup
for removing groups.Uninstall-CGroupMember
for removing accounts from a group.
- Renamed function
Resolve-CIdentity
toResolve-CPrincipal
. - Renamed function
Resolve-CIdentityName
toResolve-CPrincipalName
. - Renamed function
Test-CIdentity
toTest-CPrincipal
. - Renamed class
Carbon_Accounts_Identity
toCarbon_Accounts_Principal
. - Renamed enum
Carbon_Accounts_Identity_Type
toCarbon_Accounts_Principal_Type
.
If switching to Carbon.Accounts from Carbon, do the following:
- Remove usages of the
ConnectedServer
property onSystem.DirectoryServices.AccountManagement.Principal
objects. That was an extended type property added by Carbon and it no longer exists. - Remove usages of the
Carbon.Identity
andCarbon.IdentityType
types.Carbon.Accounts
now uses and returns native PowerShell classes and enums instead. The new native/classes enums are identical to the old compiled types, so no need to update object usages.
ConvertTo-CSecurityIdentifier
(from Carbon).Resolve-CIdentity
(from Carbon).Test-CIdentity
(from Carbon).Resolve-CIdentityName
(from Carbon).