-
Notifications
You must be signed in to change notification settings - Fork 237
Fix local remoting #801
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix local remoting #801
Changes from 2 commits
d577c4e
e7a9115
efdfa78
ea22bfc
7a85460
65a4760
af7ac0d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -218,7 +218,16 @@ internal static RunspaceDetails CreateFromRunspace( | |
// ProcessId property isn't on the object, move on. | ||
} | ||
|
||
if (runspace.ConnectionInfo.ComputerName != "localhost") | ||
// Grab the $host.name which will tell us if we're in a PSRP session or not | ||
string hostname = | ||
PowerShellContext.ExecuteScriptAndGetItem<string>( | ||
"$host.name", | ||
TylerLeonhardt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
runspace, | ||
defaultValue: ""); | ||
TylerLeonhardt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
// hostname is 'ServerRemoteHost' when the user enters a session. | ||
// ex. Enter-PSSession, Enter-PSHostProcess | ||
if (hostname == "ServerRemoteHost") | ||
TylerLeonhardt marked this conversation as resolved.
Show resolved
Hide resolved
|
||
{ | ||
runspaceId = | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This runspaceId variable doesn't seem to be used anywhere, and perhaps it is not needed. Also the default value returned should not be runspace, but a default runspace id. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I've deleted that line of code. Thanks @PaulHigin! |
||
PowerShellContext.ExecuteScriptAndGetItem<Guid>( | ||
|
Uh oh!
There was an error while loading. Please reload this page.