次の方法で共有


DisconnectByUserName method of the PS_VpnUser class

This cmdlet disconnects a VPN connection originated by a specific user or originating from a specific client machine

Syntax

uint32 DisconnectByUserName(
  [in]  string  UserName[],
  [in]  string  ComputerName,
  [in]  boolean PassThru,
  [out] string  cmdletOutput[]
);

Parameters

UserName [in]

Represents the list of users that need to be disconnected. The user's remote access login name is used which may or may not be a domain account. If it's a domain account then it can be specified in DOMAIN\USERNAME format. Else it is specified as a normal string

ComputerName [in]

IPv4/IPv6 address or hostname of the machine on which the remote access server machine specific tasks should be executed. When ComputerName is specified the cmdlet looks for the specified user or host IP on that remote access server

PassThru [in]

Returns an object, viz. the list of users/client IPs that were successfully disconnected. By default this cmdlet does not generate any output

cmdletOutput [out]

  1. List of users successfully disconnected - if username is specified 2. List of host machines successfully disconnected - if host IP is specified

Requirements

Minimum supported client
None supported
Minimum supported server
Windows Server 2012
Namespace
Root\Microsoft\Windows\RemoteAccess
MOF
RAMgmtPSProvider.mof
DLL
RAMgmtPSProvider.dll

See also

PS_VpnUser