New-FilesUser

Create User.

Syntax

New-FilesUser [-AvatarFile <FilesCom.PowerShell.FilesAttachment>] [-AvatarDelete <System.Boolean>] [-ChangePassword <System.Security.SecureString>] [-ChangePasswordConfirmation <System.Security.SecureString>] [-Email <System.String>] [-GrantPermission <System.String>] [-GroupId <System.Int64>] [-GroupIds <System.Int64[]>] [-ImportedPasswordHash <System.Security.SecureString>] [-Password <System.Security.SecureString>] [-PasswordConfirmation <System.Security.SecureString>] [-AnnouncementsRead <System.Boolean>] [-AiAssistantPersonalityId <System.Int64>] [-AllowedIps <System.String[]>] [-AttachmentsPermission <System.Boolean>] [-AuthenticateUntil <System.DateTimeOffset>] [-AuthenticationMethod <System.String>] [-BillingPermission <System.Boolean>] [-BypassUserLifecycleRules <System.Boolean>] [-BypassSiteAllowedIps <System.Boolean>] [-DavPermission <System.Boolean>] [-DesktopConfigurationProfileId <System.Int64>] [-DefaultWorkspaceId <System.Int64>] [-Disabled <System.Boolean>] [-FilesystemLayout <System.String>] [-FtpPermission <System.Boolean>] [-HeaderText <System.String>] [-IntegrationCentricProfileId <System.Int64>] [-Language <System.String>] [-NotificationDailySendTime <System.Int64>] [-Name <System.String>] [-Company <System.String>] [-Notes <System.String>] [-OfficeIntegrationEnabled <System.Boolean>] [-PartnerAdmin <System.Boolean>] [-PartnerId <System.Int64>] [-PasswordValidityDays <System.Int64>] [-PrimaryGroupId <System.Int64>] [-ReadonlySiteAdmin <System.Boolean>] [-ReceiveAdminAlerts <System.Boolean>] [-NotifyOnAllSiteWarnings <System.Boolean>] [-NotifyOnAllSsoFailures <System.Boolean>] [-NotifyOnAllUserSecurityEvents <System.Boolean>] [-NotifyOnAllPendingWorkFailures <System.Boolean>] [-NotifyOnAllSiemHttpDestinationFailures <System.Boolean>] [-NotifyOnAllSyncFailures <System.Boolean>] [-NotifyOnAllAutomationFailures <System.Boolean>] [-NotifyOnAllExpectationFailures <System.Boolean>] [-RequireLoginBy <System.DateTimeOffset>] [-RequirePasswordChange <System.Boolean>] [-ResponsibleGroupId <System.Int64>] [-ResponsibleUserId <System.Int64>] [-RestapiPermission <System.Boolean>] [-S3CompatibleEndpointPermission <System.Boolean>] [-SelfManaged <System.Boolean>] [-SftpPermission <System.Boolean>] [-SiteAdmin <System.Boolean>] [-SkipWelcomeScreen <System.Boolean>] [-SslRequired <System.String>] [-SsoStrategyId <System.Int64>] [-SubscribeToNewsletter <System.Boolean>] [-Require2fa <System.String>] [-Tags <System.String[]>] [-TimeZone <System.String>] [-UserRoot <System.String>] [-UserHome <System.String>] [-WorkspaceAdmin <System.Boolean>] -Username <System.String> [-WorkspaceId <System.Int64>] [-Connection <FilesCom.PowerShell.FilesConnection>] [-WorkspaceScope <System.Int64>] [-NoWorkspaceScope] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

Create User.

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.

File parameters take a FilesAttachment: a local file from Get-Item, such as (Get-Item ./logo.png), or one New-FilesAttachment makes from a file, bytes or a stream. The file goes in the same request as the other parameters, whose values are sent exactly as they would be without it; a local file is opened, and a stream read, only when the command goes ahead with the change: never under -WhatIf or when a confirmation is declined. A stream is borrowed: the command leaves it open.

Examples

Example 1: Create User

New-FilesUser -Username 'user' -AiAssistantPersonalityId 1 -AllowedIps '10.0.0.0/8', '127.0.0.1'

Writes the user returned.

Example 2: Preview the change

New-FilesUser -Username 'user' -AiAssistantPersonalityId 1 -AllowedIps '10.0.0.0/8', '127.0.0.1' -WhatIf

Describes the change without sending anything to Files.com.

Parameters

-AvatarFile

An image file for your user avatar. Give a FilesAttachment, such as (Get-Item ./file.png) or one from New-FilesAttachment.

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

-AvatarDelete

If true, the avatar will be deleted.

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

-ChangePassword

Used for changing a password on an existing user. Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-ChangePasswordConfirmation

Optional, but if provided, we will ensure that it matches the value sent in change_password. Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-Email

User's email.

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

-GrantPermission

Permission to grant on the User Root upon creation, or on the Workspace root when the User Root is blank. For the Default Workspace, a blank User Root uses the site root. admin on a Custom Workspace's root grants Workspace Administrator access; on a subfolder it grants Folder Admin access. Can be blank or admin, full, read, write, list, read+write, list+write, or history.

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

-GroupId

Group ID to associate this user with.

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

-GroupIds

A list of group ids to associate this user with. Comma delimited. Give the values as an array; the module joins them as the API expects.

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

-ImportedPasswordHash

Pre-calculated hash of the user's password. If supplied, this will be used to authenticate the user on first login. Supported hash methods are MD5, SHA1, and SHA256. Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-Password

User password. Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-PasswordConfirmation

Optional, but if provided, we will ensure that it matches the value sent in password. Give a SecureString, such as one from Read-Host -AsSecureString or Get-Secret; text typed on the command line, even inside ConvertTo-SecureString, stays in command history.

  • Type: System.Security.SecureString
  • Parameter sets: (All)

-AnnouncementsRead

Signifies that the user has read all the announcements in the UI.

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

-AiAssistantPersonalityId

AI Assistant Personality ID assigned directly to this user, if any.

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

-AllowedIps

A list of allowed IPs if applicable. Newline delimited Give the values as an array; the module joins them as the API expects.

  • Type: System.String[]
  • Parameter sets: (All)

-AttachmentsPermission

DEPRECATED: If true, the user can user create Bundles (aka Share Links). Use the bundle permission instead.

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

-AuthenticateUntil

Scheduled Date/Time at which user will be deactivated Give a DateTime from Get-Date, a DateTimeOffset, or ISO 8601 text with an offset such as 2026-01-31T14:00:00Z.

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

-AuthenticationMethod

How is this user authenticated?

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

-BillingPermission

Allow this user to perform operations on the account, payments, and invoices?

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

-BypassUserLifecycleRules

Exempt this user from user lifecycle rules?

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

-BypassSiteAllowedIps

Allow this user to skip site-wide IP blacklists?

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

-DavPermission

Can the user connect with WebDAV?

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

-DesktopConfigurationProfileId

Desktop Configuration Profile ID assigned directly to this user, if any.

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

-DefaultWorkspaceId

Workspace ID the user should land in by default when more than one Workspace is available.

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

-Disabled

Is user disabled? Disabled users cannot log in, and do not count for billing purposes. Users can be automatically disabled after an inactivity period via a Site setting or schedule to be deactivated after specific date.

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

-FilesystemLayout

File system layout

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

-FtpPermission

Can the user access with FTP/FTPS?

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

-HeaderText

Text to display to the user in the header of the UI

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

-IntegrationCentricProfileId

Integration Centric Profile ID assigned directly to this user, if any.

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

-Language

Preferred language

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

-NotificationDailySendTime

Hour of the day at which daily notifications should be sent. Can be in range 0 to 23

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

-Name

User's full name

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

-Company

User's company

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

-Notes

Any internal notes on the user

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

-OfficeIntegrationEnabled

Enable integration with Office for the web?

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

-PartnerAdmin

Is this user a Partner administrator?

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

-PartnerId

Partner ID if this user belongs to a Partner

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

-PasswordValidityDays

Number of days to allow user to use the same password

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

-PrimaryGroupId

Primary group ID for Group Admin scoping

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

-ReadonlySiteAdmin

Is the user an allowed to view all (non-billing) site configuration for this site?

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

-ReceiveAdminAlerts

Deprecated. Use notify_on_all_site_warnings and granular failure notification preferences instead.

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

-NotifyOnAllSiteWarnings

Should the user receive site warnings via email?

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

-NotifyOnAllSsoFailures

Should the user receive sso/scim/ldap configuration/sync failures via email?

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

-NotifyOnAllUserSecurityEvents

Should the user receive user security events via email?

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

-NotifyOnAllPendingWorkFailures

Should the user receive pending work failures via email?

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

-NotifyOnAllSiemHttpDestinationFailures

Should the user receive siem failures via email?

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

-NotifyOnAllSyncFailures

Should the user receive sync failures via email?

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

-NotifyOnAllAutomationFailures

Should the user receive automation failures via email?

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

-NotifyOnAllExpectationFailures

Should the user receive expectation failures and misses via email?

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

-RequireLoginBy

Require user to login by specified date otherwise it will be disabled. Give a DateTime from Get-Date, a DateTimeOffset, or ISO 8601 text with an offset such as 2026-01-31T14:00:00Z.

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

-RequirePasswordChange

Is a password change required upon next user login?

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

-ResponsibleGroupId

ID of the internal Group responsible for this Partner User, overriding the Partner default.

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

-ResponsibleUserId

ID of the internal User responsible for this Partner User, overriding the Partner default.

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

-RestapiPermission

Can this user access the Web app, Desktop app, SDKs, or REST API? (All of these tools use the API internally, so this is one unified permission set.)

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

-S3CompatibleEndpointPermission

Can the user access the S3-compatible endpoint? Defaults to true.

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

-SelfManaged

Does this user manage it's own credentials or is it a shared/bot user?

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

-SftpPermission

Can the user access with SFTP?

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

-SiteAdmin

Is the user an administrator for this site?

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

-SkipWelcomeScreen

Skip Welcome page in the UI?

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

-SslRequired

SSL required setting

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

-SsoStrategyId

SSO (Single Sign On) strategy ID for the user, if applicable.

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

-SubscribeToNewsletter

Is the user subscribed to the newsletter?

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

-Require2fa

2FA required setting. use_system_setting uses the site-wide setting, including SSO exemptions. always_require and never_require override the site-wide setting when user-level overrides are allowed.

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

-Tags

Comma-separated list of Tags for this user. Tags are used for other features, such as UserLifecycleRules, which can target specific tags. Tags must only contain lowercase letters, numbers, and hyphens. Give the values as an array; the module joins them as the API expects.

  • Type: System.String[]
  • Parameter sets: (All)

-TimeZone

User time zone

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

-UserRoot

If filesystem layout is user_root, this path is the root path the user is fixed to for all interfaces. If the filesystem layout is site_root or partner_root, this acts as a root folder only for FTP and SFTP (SFTP applicability also requires a site-wide setting to be set). For partner_root layout, this path is relative to the Partner root folder for all callers and blank opts out of an additional protocol root. In this situation, this path is not applied to the API, Desktop, or Web interface.

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

-UserHome

Home folder for FTP/SFTP. For users with the partner_root filesystem layout, this path is relative to the Partner root folder. In all other cases, it is an absolute path. Only applies to FTP and SFTP, and not any other interface.

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

-WorkspaceAdmin

Whether the user is an administrator of their own Custom Workspace. Does not reflect administration granted through Permissions.

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

-Username

User's username

  • Type: System.String
  • Parameter sets: (All) (required)

-WorkspaceId

ID of the Workspace the user belongs to. 0 is the Default Workspace.

  • 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 $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

None. The command takes no pipeline input.

Outputs

  • FilesCom.PowerShell.Models.User: the user 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.