Set-FilesUserLifecycleRule

Update User Lifecycle Rule.

Syntax

Id (Default)

Set-FilesUserLifecycleRule [-Id] <System.Int64> [-Action <System.String>] [-ApplyToAllWorkspaces <System.Boolean>] [-AuthenticationMethod <System.String>] [-GroupIds <System.Int64[]>] [-InactivityDays <System.Int64>] [-IncludeSiteAdmins <System.Boolean>] [-IncludeFolderAdmins <System.Boolean>] [-Name <System.String>] [-NotifyUsers <System.Boolean>] [-PartnerTag <System.String>] [-UserState <System.String>] [-UserTag <System.String>] [-WorkspaceId <System.Int64>] [-Connection <FilesCom.PowerShell.FilesConnection>] [-WorkspaceScope <System.Int64>] [-NoWorkspaceScope] [-WhatIf] [-Confirm] [<CommonParameters>]

InputObject

Set-FilesUserLifecycleRule [-Action <System.String>] [-ApplyToAllWorkspaces <System.Boolean>] [-AuthenticationMethod <System.String>] [-GroupIds <System.Int64[]>] [-InactivityDays <System.Int64>] [-IncludeSiteAdmins <System.Boolean>] [-IncludeFolderAdmins <System.Boolean>] [-Name <System.String>] [-NotifyUsers <System.Boolean>] [-PartnerTag <System.String>] [-UserState <System.String>] [-UserTag <System.String>] [-WorkspaceId <System.Int64>] -InputObject <FilesCom.PowerShell.Models.UserLifecycleRule> [-Connection <FilesCom.PowerShell.FilesConnection>] [-WorkspaceScope <System.Int64>] [-NoWorkspaceScope] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Update User Lifecycle Rule.

The command accepts user lifecycle rules from the pipeline as -InputObject, and uses each one's Id and the connection that fetched it.

When given -InputObject, the command updates that object with the values Files.com returns and writes it.

The command supports -WhatIf, which describes the change without sending it to Files.com, and -Confirm, which asks before sending it. It asks for confirmation by default; use -Confirm:$false in scripts that have already decided.

Examples

Example 1: Update User Lifecycle Rule

Set-FilesUserLifecycleRule -Id 1 -Action 'disable' -ApplyToAllWorkspaces $true

Writes the user lifecycle rule as Files.com returns it.

Example 2: Act on user lifecycle rules from the pipeline

Get-FilesUserLifecycleRule -Id 1 | Set-FilesUserLifecycleRule -Action 'disable' -ApplyToAllWorkspaces $true

Takes the user lifecycle rule from the pipeline and uses its Id and connection.

Example 3: Preview the change

Set-FilesUserLifecycleRule -Id 1 -Action 'disable' -ApplyToAllWorkspaces $true -WhatIf

Describes the change without sending anything to Files.com.

Parameters

-Id

User Lifecycle Rule ID.

  • Type: System.Int64
  • Parameter sets: Id (required, position 0)

-Action

Action to take on inactive users (disable or delete)

  • Type: System.String
  • Parameter sets: Id, InputObject

-ApplyToAllWorkspaces

If true, a Default Workspace rule also applies to users in all Custom Workspaces. Can only be enabled when workspace_id is 0.

  • Type: System.Boolean
  • Parameter sets: Id, InputObject

-AuthenticationMethod

User authentication method for which the rule will apply. Use all_non_sso to target every non-SSO authentication method with one rule.

  • Type: System.String
  • Parameter sets: Id, InputObject

-GroupIds

Array of Group IDs to which the rule applies. If empty or not set, the rule applies to all users.

  • Type: System.Int64[]
  • Parameter sets: Id, InputObject

-InactivityDays

Number of days of inactivity before the rule applies

  • Type: System.Int64
  • Parameter sets: Id, InputObject

-IncludeSiteAdmins

If true, the rule includes Site Administrators, who always belong to the Default Workspace. Can only be enabled when workspace_id is 0.

  • Type: System.Boolean
  • Parameter sets: Id, InputObject

-IncludeFolderAdmins

If true, the rule will apply to folder admins.

  • Type: System.Boolean
  • Parameter sets: Id, InputObject

-Name

User Lifecycle Rule name

  • Type: System.String
  • Parameter sets: Id, InputObject

-NotifyUsers

If true, users will be emailed before the rule disables or deletes them.

  • Type: System.Boolean
  • Parameter sets: Id, InputObject

-PartnerTag

If provided, only users belonging to Partners with this tag at the Partner level will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.

  • Type: System.String
  • Parameter sets: Id, InputObject

-UserState

State of the users to apply the rule to (inactive or disabled)

  • Type: System.String
  • Parameter sets: Id, InputObject

-UserTag

If provided, only users with this tag will be affected by the rule. Tags must only contain lowercase letters, numbers, and hyphens.

  • Type: System.String
  • Parameter sets: Id, InputObject

-WorkspaceId

Workspace whose users the rule applies to. 0 means the Default Workspace. A Custom Workspace rule applies only to users who belong to that Workspace, regardless of access granted to other users.

  • Type: System.Int64
  • Parameter sets: Id, InputObject

-InputObject

The user lifecycle rule to act on, such as one written by another command of the module, from the pipeline. The command uses its Id and the connection that fetched it.

  • Type: FilesCom.PowerShell.Models.UserLifecycleRule
  • Parameter sets: InputObject (required)

-Connection

The connection to use, from Connect-FilesAccount. Defaults to the connection of the -InputObject or -Continuation given, and otherwise to the current runspace's default connection.

  • Type: FilesCom.PowerShell.FilesConnection
  • Parameter sets: (All)

-WorkspaceScope

Runs this command's requests in this workspace, including workspace 0, instead of the connection's or, for an -InputObject, instead of the workspace the object was read in. The connection and the object are unchanged.

  • Type: System.Int64
  • Parameter sets: (All)

-NoWorkspaceScope

Runs this command's requests in no workspace, even if the connection has one. The connection itself is unchanged.

  • Type: System.Management.Automation.SwitchParameter
  • Parameter sets: (All)

-Confirm

Prompts you for confirmation before running the cmdlet.

  • Type: System.Management.Automation.SwitchParameter
  • Confirm impact: High. At the default $ConfirmPreference of High, the command asks before each change; -Confirm:$false runs it without asking.

-WhatIf

Shows what the cmdlet would change without sending anything to Files.com.

  • Type: System.Management.Automation.SwitchParameter

Common Parameters

This cmdlet supports the PowerShell common parameters, such as -Verbose and -ErrorAction.

Inputs

  • FilesCom.PowerShell.Models.UserLifecycleRule: a user lifecycle rule from another command of the module, as -InputObject.

Outputs

  • FilesCom.PowerShell.Models.UserLifecycleRule: the user lifecycle rule as Files.com returned it.

Notes

Failures are written as error records with IDs such as Files.NotFound or Files.Authentication. Run Get-Help about_FilesCom for connections, paging, errors and previewing changes.