Skip to content

Remove-StolenPC

SYNOPSIS

Remove a stolen PC from various platforms (AD, AAD, SentinelOne, Infoblox, PasswordState).

SYNTAX

Remove-StolenPC [[-TaskNr] <UInt64>] [[-strHostName] <String>] [[-timeSpent] <Int32>]

DESCRIPTION

This function removes a stolen PC from multiple platforms, including Active Directory, Azure Active Directory, SentinelOne, Infoblox, and PasswordState. It also logs the operation in the corresponding Ivanti task. The function checks the PC's status, removes it from the platforms, and provides a summary of the operation.

EXAMPLES

EXAMPLE 1

Remove-StolenPC -TaskNr 9999999 -strHostName CP999999 -timeSpent 15

Removes the stolen PC "CP999999" from various platforms and logs the operation in Ivanti with 15 minutes spent.

EXAMPLE 2

Remove-StolenPC -TaskNr 9999999 -strHostName CP999999

Removes the stolen PC "CP999999" from various platforms and logs the operation in Ivanti with the default time spent.

PARAMETERS

-TaskNr

The Ivanti task number associated with the operation (format: 1234567).

Type: UInt64
Parameter Sets: (All)
Aliases:

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

-strHostName

The hostname of the stolen PC to be removed.

Type: String
Parameter Sets: (All)
Aliases:

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

-timeSpent

The number of minutes spent on the operation, which will be added to the corresponding Ivanti task. Defaults to 10 minutes.

Type: Int32
Parameter Sets: (All)
Aliases:

Required: False
Position: 3
Default value: 10
Accept pipeline input: False
Accept wildcard characters: False

INPUTS

String

OUTPUTS

Comment in the corresponding Ivanti task

NOTES

This script must be run from a console server. It requires the following modules: - SentinelOneHelper - PasswordstateHelper - InfobloxHelper