Use the Remove-NAVServerUser cmdlet to delete a Business Central user from a specified database or tenant database that is connected to a Business Central Server instance.
This example deletes a Business Central user from the database that is connected to the Business Central Server server instance that has the name MicrosoftDynamicsNavServer.
The user is identified by the security identifier.
This example uses piping to delete all Business Central users for the Business Central Server instance with the name MicrosoftDynamicsNavServer.
Parameters
-Confirm
Prompts you for confirmation before executing the command.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
cf
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Force
Forces the command to run without asking for user confirmation.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-InputObject
Specifies the DataRow object that identifies the user to remove.
You can pass this object from the Get-NAVServerUser cmdlet.
Parameter properties
Type:
DataRow
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
InputObject
Position:
Named
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ProgressAction
A common PowerShell parameter that determines how PowerShell responds to progress updates generated by a script, cmdlet, or provider. Learn more.
Parameter properties
Type:
ActionPreference
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
proga
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-ServerInstance
Specifies the name of a Business Central Server instance, for example, BC or myinstance. You can specify either the full name of an instance, such as MicrosoftDynamicsNavServer$myinstance or the short name such as myinstance.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
True
Value from remaining arguments:
False
-Sid
A security identifier (SID) for the Business Central user to delete. The SID is a unique value that identifies a Windows user account. You can use the Sid, UserName, or WindowsAccount parameters to identify the user. If you use the Sid parameter, then do not set the UserName or WindowsAccount parameters.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
Sid
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Tenant
Specifies the ID of the tenant that the user is stored in, such as Tenant1. This parameter is required unless the specified service instance is not configured to run multiple tenants.
Parameter properties
Type:
TenantId
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
Id
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
True
Value from remaining arguments:
False
-UserName
Specifies the user name of a Business Central user to delete. The user name is defined by the User Name field in a user's account in Business Central. You can use the UserName, WindowsAccount or Sid parameters to identify the user. If you use the Username parameter, then you cannot use the Windows Account or Sid parameters.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
UserName
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-WhatIf
Describes what would happen if you executed the command without actually executing the command.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Aliases:
wi
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-WindowsAccount
Specifies the Windows user name of the Business Central user to delete. The value has the ___domain\username format. You can use the WindowsAccount, UserName, or Sid parameters to identify the user. If you use the WindowsAccount parameter, then you cannot use the UserName or Sid parameters.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
WindowsAccount
Position:
Named
Mandatory:
True
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
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
System.String
You can pipe a string that contains a Business Central Server instance name and tenant ID, if applicable, to the cmdlet.
System.Data.DataRow
You can pass this object from the Get-NAVServerUser cmdlet to remove a user.