Functions/Disable-OrchPersonalWorkspace.ps1
function Disable-OrchPersonalWorkspace { [CmdletBinding(SupportsShouldProcess = $true)] Param ( [Parameter(Position = 0, Mandatory = $true, ValueFromPipelineByPropertyName = $true)] [SupportsWildcards()] [ArgumentCompleter([UiPath.PowerShell.Completer.TenantUserNameCompleter[UiPath.PowerShell.Positional.UserName]])] [string[]]$UserName, [Parameter(ValueFromPipelineByPropertyName = $true)] [ArgumentCompleter([UiPath.PowerShell.Completer.DriveCompleter[UiPath.PowerShell.Positional.UserName]])] [string[]]$Path ) foreach ($user in $UserName) { Update-OrchUser @PSBoundParameters -Path $Path -UserName $user -MayHavePersonalWorkspace False Clear-OrchCache -Path $Path } } |