Rename-EndpointDevices
SYNOPSIS
Rename endpoint devices in Intune based on Ivanti data.
SYNTAX
Rename-EndpointDevices [[-ivantiInstance] <String>] [[-Logfile] <String>] [-all] [-ios] [-macos] [-android]
[-windows] [-mobile] [<CommonParameters>]
DESCRIPTION
This function connects to Ivanti and Microsoft Intune to retrieve device information, processes the data, and renames endpoint devices in Intune based on corresponding Ivanti Configuration Items (CIs). It supports filtering by device type and logs the operation details.
EXAMPLES
EXAMPLE 1
Renames all endpoint devices in Intune using data from the "ivantiQA" instance.
EXAMPLE 2
Renames only iOS devices in Intune using data from the "ivantiPR" instance.
EXAMPLE 3
Renames only Windows devices in Intune using data from the "ivantiDV" instance and logs the operation to the specified log file.
PARAMETERS
-ivantiInstance
The Ivanti instance to connect to. Valid values are "ivantiDV", "ivantiQA", and "ivantiPR". Default is "ivantiPR".
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 1
Default value: IvantiPR
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False
-Logfile
The path to the log file where operation details will be recorded. Default is a timestamped log file in the Intune logs folder.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: 2
Default value: ("\\stadgent\dumps\Logs\Intune\$((Get-Date).toString('yyyyMMdd'))_Rename-IntuneDevices.log")
Accept pipeline input: False
Accept wildcard characters: False
-all
A switch to process all devices regardless of their operating system.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-ios
A switch to process only iOS devices.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-macos
A switch to process only macOS devices.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-android
A switch to process only Android devices.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-windows
A switch to process only Windows devices.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False
-mobile
A switch to process only mobile devices (iOS and Android).
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: False
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.