Notification

Icon
Error

Launch PowerShell remote PSSession

Posted: Friday, August 9, 2019 12:07:41 PM(UTC)
Ian

Ian

Member Original PosterPosts: 4
1
Like
This issue has been solved! Click here to view the solution
Hi Folks,

I am trying to launch the below command from the basic actions menu for an asset but the PowerShell window displays and then closes with no output

I have the command working from a normal PowerShell window on the Lansweeper server.

The two commands I have tried are below:
powershell.exe Enter-PSSession -ComputerName {computer}
powershell.exe set-executionpolicy bypass Enter-PSSession -ComputerName {computer}

Any ideas what I am doing wrong?
steveb
#1steveb Member Posts: 10  
posted: 9/5/2019 10:21:40 PM(UTC)
Its not exactly what you want but it does work via psexec.

{actionpath}psexec.exe /accepteula \\{smartname} powershell.exe

I cannot get it to work the same way you were trying it either.
steveb
#2steveb Member Posts: 10  
posted: 9/5/2019 10:36:52 PM(UTC)
I got it to work. Try adding the -noexit parameter.

powershell.exe -noexit Enter-PSSession -ComputerName {smartname}

For anyone else, here is the how to I followed for enabling remote powershell sessions if you don't already have it setup.

remote powershell enable
Ian
#3Ian Member Original PosterPosts: 4  
posted: 9/9/2019 12:10:56 PM(UTC)
Originally Posted by: steveb Go to Quoted Post
I got it to work. Try adding the -noexit parameter.

powershell.exe -noexit Enter-PSSession -ComputerName {smartname}

For anyone else, here is the how to I followed for enabling remote powershell sessions if you don't already have it setup.

remote powershell enable


Thanks for that Steve, it worked perfectly.

Active Discussions

Lansweeper 2019 Fall Release
by  Guest   Go to last post Go to first unread
Last post: 10/1/2019 3:10:48 PM(UTC)
Lansweeper Introducing Our Brand New Report Library
by  Esben.D  
Go to last post Go to first unread
Last post: 7/2/2019 2:09:53 PM(UTC)
Lansweeper Lansweeper subreddit
by  Esben.D   Go to last post Go to first unread
Last post: 4/4/2019 8:57:11 AM(UTC)
Lansweeper 2019 Spring Release
by  Esben.D  
Go to last post Go to first unread
Last post: 3/5/2019 4:11:32 PM(UTC)
Lansweeper Mozilla Firefox Remote Execution Vulnerability
by  Esben.D   Go to last post Go to first unread
Last post: 10/5/2018 12:33:36 PM(UTC)
Lansweeper Lansweeper 7 Released
by  Esben.D  
Go to last post Go to first unread
Last post: 9/19/2018 1:33:10 PM(UTC)
Lansweeper MEGA Chrome Extension Vulnerability
by  Esben.D   Go to last post Go to first unread
Last post: 9/6/2018 1:25:43 PM(UTC)
Lansweeper Intel Foreshadow Vulnerability
by  Esben.D  
Go to last post Go to first unread
Last post: 8/20/2018 1:54:28 PM(UTC)