For the complete documentation index, see llms.txt. This page is also available as Markdown.

Invoke-RDMUserCleanup

Synopsis

Disable or delete users that no longer match their identity provider.

Syntax

__AllParameterSets

Invoke-RDMUserCleanup [-InputObject] <PSUserSyncResult[]> -CleanupOption <UserCleanupOption>
 [-UnassignLicenses] [-TransferUserVaultToSharedVault] [-ForcePromptAnswer <DialogResult[]>]
 [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Disable or delete users that no longer match their identity provider, normally the ones reported by Sync-RDMUser. Every piped user receives the same CleanupOption, so run the cmdlet once per option to apply a mix. Users left out of the pipeline are untouched. Deleted users are moved to the deleted users list rather than removed permanently. Requires a Devolutions Server workspace.

Examples

Example 1

PS C:\> Sync-RDMUser -Provider Domain | Invoke-RDMUserCleanup -CleanupOption Disable -UnassignLicenses

Disable every user the domain could not reconcile and release the licenses they held.

Example 2

Apply a different option to each group, keeping the private vault contents of the deleted users.

Parameters

-CleanupOption

The action to apply to every piped user. To leave a user alone, keep it out of the pipeline.

-Confirm

Prompts for confirmation before running the cmdlet.

-ForcePromptAnswer

Switch to use with caution. It will automatically answer prompt asking yes/no, yes/no/cancel, or ok/cancel questions. In case of multiple prompts, multiple values can be passed to this parameter. Here are the accepted values:

  • Yes: Accept the prompt. Cover the OK and Automatic value.

  • No: Refuse the yes/no/cancel prompt. "Cancel" is the fallback option if there is no "No" option.

  • Cancel: Cancel the yes/no/cancel prompt. "No" is the fallback option if there is no "Cancel" option.

-InputObject

Specifies the users to clean up. Users must be reported by Sync-RDMUser.

-TransferUserVaultToSharedVault

Move the private vault contents of the deleted users into a new shared vault. Only applies to the Delete option.

-UnassignLicenses

Release the licenses held by the disabled users. Only applies to the Disable option.

-WhatIf

Shows what would happen if the cmdlet were to run. The cmdlet does not run.

CommonParameters

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

Inputs

RemoteDesktopManager.PowerShellModule.PSOutputObject.PSUserSyncResult[]

Users reported by Sync-RDMUser

Notes

For more information, type "Get-Help Invoke-RDMUserCleanup -detailed". For technical information, type "Get-Help Invoke-RDMUserCleanup -full".

Last updated

Was this helpful?