Get-ADUserPrimaryComputer
SYNOPSIS
Retrieves the primary computer associated with an Active Directory user.
SYNTAX
DESCRIPTION
The `Get-ADUserPrimaryComputer` function retrieves the primary computer associated with a specified Active Directory user. It queries both Active Directory and an external HEAT database to determine the computer most frequently associated with the user.
EXAMPLES
EXAMPLE 1
Retrieves the primary computer associated with the user "jdoe."
EXAMPLE 2
Retrieves the primary computers associated with the users "jdoe" and "asmith."
PARAMETERS
-Identity
The identity of the Active Directory user(s) to query (e.g., DistinguishedName, UserPrincipalName, or SamAccountName).
Type: String[]
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-Confirm
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
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.