InvokePower Shell Command Logoff error

I need to run a process in UiPath where when rpa is executed performs the logoff of the target machine, I’m trying to pass the logoff but ta giving the error:

Invoke Power Shell: PowerShell command errors:
Invalid parameter(s)
Ends a session.

LOGOFF [session_name | session_id] [/SERVER:server_name] [/V] [/VM]

session_name Name of the session.
sessionid session id.
/SERVER:servername Specifies the Remote Desktop server that
contains the user
the user session to log off from
(default is current).
/V Displays information about actions performed.
/VM Logs off a session on the server or virtual machine.
The unique session ID needs to be specified.

Looks like you’re not passing the correct parameters into the ‘Invoke Power Shell’-activity.
If you don’t figure it out you could use this instead:

1 Like