salt.modules.rdp

Manage RDP Service on Windows servers

salt.modules.rdp.disable()

Disable RDP the service on the server

CLI 范例:

salt '*' rdp.disable
salt.modules.rdp.disconnect_session(session_id)

Disconnect a session.

Carbon 新版功能.

参数:session_id -- The numeric Id of the session.
返回:A boolean representing whether the disconnect succeeded.

CLI 范例:

salt '*' rdp.disconnect_session session_id

salt '*' rdp.disconnect_session 99
salt.modules.rdp.enable()

Enable RDP the service on the server

CLI 范例:

salt '*' rdp.enable
salt.modules.rdp.get_session(session_id)

Get information about a session.

Carbon 新版功能.

参数:session_id -- The numeric Id of the session.
返回:A dictionary of session information.

CLI 范例:

salt '*' rdp.get_session session_id

salt '*' rdp.get_session 99
salt.modules.rdp.list_sessions(logged_in_users_only=False)

List information about the sessions.

Carbon 新版功能.

参数:logged_in_users_only -- If True, only return sessions with users logged in.
返回:A list containing dictionaries of session information.

CLI 范例:

salt '*' rdp.list_sessions
salt.modules.rdp.logoff_session(session_id)

Initiate the logoff of a session.

Carbon 新版功能.

参数:session_id -- The numeric Id of the session.
返回:A boolean representing whether the logoff succeeded.

CLI 范例:

salt '*' rdp.logoff_session session_id

salt '*' rdp.logoff_session 99
salt.modules.rdp.status()

Show if rdp is enabled on the server

CLI 范例:

salt '*' rdp.status