< Back
Test-CIdentity
Post
NAME Test-CIdentity
SYNOPSIS
Tests that a name is a valid Windows local or domain user/group.
SYNTAX
Test-CIdentity [-Name] <String> [-PassThru] [<CommonParameters>]
DESCRIPTION
Uses the Windows `LookupAccountName` function to find an identity. If it can't be found, returns `$false`.
Otherwise, it returns `$true`.
Use the `PassThru` switch to return a `Carbon.Identity` object (instead of `$true` if the identity exists.
PARAMETERS
-Name <String>
The name of the identity to test.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Returns a `Carbon.Identity` object if the identity exists.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Test-CIdentity -Name 'Administrators
Tests that a user or group called `Administrators` exists on the local computer.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Test-CIdentity -Name 'CARBON\\Testers'
Tests that a group called `Testers` exists in the `CARBON` domain.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Test-CIdentity -Name 'Tester' -PassThru
Tests that a user or group named `Tester` exists and returns a `System.Security.Principal.SecurityIdentifier`
object if it does.
RELATED LINKS
Resolve-CIdentity
Resolve-CIdentityName
Name : Test-IisAppPool
Category : Alias
Synopsis : Test-CIisAppPool
Component :
Role :
Functionality :
CommonParameters : False
WorkflowCommonParameters : False
details : @{name=Test-IISAppPoolIdentity; noun=; verb=}
Syntax : @{syntaxItem=System.Object[]}
parameters : @{parameter=System.Object[]}
inputTypes : @{inputType=}
returnValues : @{returnValue=}
aliases : None
remarks : None
alertSet :
description :
examples :
Synopsis :
Test-IISAppPoolIdentity
ModuleName : IIS10Audit
nonTerminatingErrors :
xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10
xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10
xmlns:maml : http://schemas.microsoft.com/maml/2004/10
Name : Test-IISAppPoolIdentity
Category : Function
Component :
Role :
Functionality :
Name : Test-IisConfigurationSection
Category : Alias
Synopsis : Test-CIisConfigurationSection
Component :
Role :
Functionality :
Name : Test-IisSecurityAuthentication
Category : Alias
Synopsis : Test-CIisSecurityAuthentication
Component :
Role :
Functionality :
Name : Test-IisWebsite
Category : Alias
Synopsis : Test-CIisWebsite
Component :
Role :
Functionality :
SYNOPSIS
Tests that a name is a valid Windows local or domain user/group.
SYNTAX
Test-CIdentity [-Name] <String> [-PassThru] [<CommonParameters>]
DESCRIPTION
Uses the Windows `LookupAccountName` function to find an identity. If it can't be found, returns `$false`.
Otherwise, it returns `$true`.
Use the `PassThru` switch to return a `Carbon.Identity` object (instead of `$true` if the identity exists.
PARAMETERS
-Name <String>
The name of the identity to test.
Required? true
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Returns a `Carbon.Identity` object if the identity exists.
Required? false
Position? named
Default value False
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
-------------------------- EXAMPLE 1 --------------------------
PS C:\\>Test-CIdentity -Name 'Administrators
Tests that a user or group called `Administrators` exists on the local computer.
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>Test-CIdentity -Name 'CARBON\\Testers'
Tests that a group called `Testers` exists in the `CARBON` domain.
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Test-CIdentity -Name 'Tester' -PassThru
Tests that a user or group named `Tester` exists and returns a `System.Security.Principal.SecurityIdentifier`
object if it does.
RELATED LINKS
Resolve-CIdentity
Resolve-CIdentityName
Name : Test-IisAppPool
Category : Alias
Synopsis : Test-CIisAppPool
Component :
Role :
Functionality :
CommonParameters : False
WorkflowCommonParameters : False
details : @{name=Test-IISAppPoolIdentity; noun=; verb=}
Syntax : @{syntaxItem=System.Object[]}
parameters : @{parameter=System.Object[]}
inputTypes : @{inputType=}
returnValues : @{returnValue=}
aliases : None
remarks : None
alertSet :
description :
examples :
Synopsis :
Test-IISAppPoolIdentity
ModuleName : IIS10Audit
nonTerminatingErrors :
xmlns:command : http://schemas.microsoft.com/maml/dev/command/2004/10
xmlns:dev : http://schemas.microsoft.com/maml/dev/2004/10
xmlns:maml : http://schemas.microsoft.com/maml/2004/10
Name : Test-IISAppPoolIdentity
Category : Function
Component :
Role :
Functionality :
Name : Test-IisConfigurationSection
Category : Alias
Synopsis : Test-CIisConfigurationSection
Component :
Role :
Functionality :
Name : Test-IisSecurityAuthentication
Category : Alias
Synopsis : Test-CIisSecurityAuthentication
Component :
Role :
Functionality :
Name : Test-IisWebsite
Category : Alias
Synopsis : Test-CIisWebsite
Component :
Role :
Functionality :