Windows PowerShell Home
Error when entering PSSession in ISE after update to v5 preview
4/12/2014 6:48:40 PM
User(s) can reproduce this bug
I'm getting the following error when trying to do "Enter-PSSession computername" in Powershell ISE after installing the v5 preview. It seems to only happen in ISE. Regular console is fine. I can also invoke-command without issue in ISE.
Enter-PSSession : Object reference not set to an instance of an object. At line:1 char:1 + Enter-PSSession jparagonntier01 + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [Enter-PSSession], NullReferenceException + FullyQualifiedErrorId : System.NullReferenceException,Microsoft.PowerShell.Commands.EnterPSSessionCommand
How often does this happen?
Have you seen this problem before in this product?
No, this is new to the most recent version
1. Upgrade to Windows Management Framework 5 on Windows 8.1
2. Open Powershell ISE (tested as administrator and non-admin)
3. Attempt "Enter-PSSession" to a remote host
4. Throws the above error
A normal PSSession is opened to remote host as before
to post a comment.
Please enter a comment.
on 5/5/2014 at 9:32 AM
This is exactly what is happening to me as well.
Enter-PSSession -Session (New-PSSession -ComputerName blah.blah.com)
Enter-PSSession : Object reference not set to an instance of an object.
And then it enters me into the session and everything works fine. When I exit the PSSession I get the error below, but still exit the session.
[blah.blah.com]: PS C:\Users\Documents> Exit-PSSession
Exception has been thrown by the target of an invocation.
Even if I enter the session by doing the commands below, the same behavior occurs.
$session = New-PSSession -ComputerName blah.blah.com
From the console everything works fine.
This is on Windows 8.1 x64
to post a workaround.
Please enter a workaround.
on 4/14/2014 at 6:21 AM
Create a PSSession using New-PSSession. Use Enter-PSSession to enter the previously configured session. You will now be entered into the session.
on 4/12/2014 at 6:49 PM
Enter-PSSession works fine in standard Powershell console host.
© 2014 Microsoft