Skip to content

Get-OrganizationInfo

SYNOPSIS

Determine the organization code based on a user or organizational unit (OU).

SYNTAX

OU (Default)

Get-OrganizationInfo [-OU] <String> [<CommonParameters>]

Suffix

Get-OrganizationInfo [-Emailsuffix] <String> [<CommonParameters>]

Orgcode

Get-OrganizationInfo [-OrgCode] <String> [<CommonParameters>]

DESCRIPTION

The `Get-OrganizationInfo` function retrieves the email suffix and organization code for a specified user or organizational unit (OU). It returns a custom object containing: - EmailSuffix: The email suffix associated with the organization. - OrgCode: The short organization code (e.g., for use in group names).

EXAMPLES

EXAMPLE 1

Get-OrganizationInfo -OU "OU=Users,DC=example,DC=com"

Retrieves the organization information for the specified OU.

EXAMPLE 2

Get-OrganizationInfo -Emailsuffix "example.com"

Retrieves the organization information for the specified email suffix.

EXAMPLE 3

Get-OrganizationInfo -OrgCode "SG"

Retrieves the organization information for the specified organization code.

PARAMETERS

-OU

The organizational unit (OU) for which the organization information will be retrieved.

Type: String
Parameter Sets: OU
Aliases: user

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Emailsuffix

The email suffix to match against the organization's information.

Type: String
Parameter Sets: Suffix
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-OrgCode

The organization code to retrieve the corresponding organization information.

Type: String
Parameter Sets: Orgcode
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES