New-FilesUserLifecycleRule
Create User Lifecycle Rule.
Syntax
Description
Create User Lifecycle Rule.
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: Create User Lifecycle Rule
Writes the user lifecycle rule returned.
Example 2: Preview the change
Describes the change without sending anything to Files.com.
Parameters
-Action
Action to take on inactive users (disable or delete)
- Type:
System.String - Parameter sets:
(All)
-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:
(All)
-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:
(All)
-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:
(All)
-InactivityDays
Number of days of inactivity before the rule applies
- Type:
System.Int64 - Parameter sets:
(All)
-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:
(All)
-IncludeFolderAdmins
If true, the rule will apply to folder admins.
- Type:
System.Boolean - Parameter sets:
(All)
-Name
User Lifecycle Rule name
- Type:
System.String - Parameter sets:
(All)
-NotifyUsers
If true, users will be emailed before the rule disables or deletes them.
- Type:
System.Boolean - Parameter sets:
(All)
-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:
(All)
-UserState
State of the users to apply the rule to (inactive or disabled)
- Type:
System.String - Parameter sets:
(All)
-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:
(All)
-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:
(All)
-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
$ConfirmPreferenceofHigh, the command asks before each change;-Confirm:$falseruns 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
None. The command takes no pipeline input.
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.