Enable Enter-PSSession

Hello All
Love the site. Thank you for all the learning material, It has been very helpful.
I wanted to share this. It is what I have been doing and I am wondering if there s another way. I do not have access to GPO policies , the remote machines do not have Winrm configured and I do not have physical access o them…

I first test connection with

[blockquote]Test-WsMan computername[/blockquote]

If successful I am ok to connect, If it errors I then proceed below

Then I use
[blockquote] .\PsExec.exe \computername -u localAdmin cmd “winrm quickconfig -q”[/blockquote]

From the remote command prompt I type the command
[blockquote]winrm quickconfig[/blockquote]

and 'Y" to accept configuration and I am in.

[blockquote] Enter-PSSession -ComputerName computername[/blockquote]

Any suggestions?

WinRm quickconfig doesn’t do as much as Enable-PSRemoting; you might consider running powershell.exe and having it run Enable-PSRemoting.