Beta.9 - Install-PowerShellRemoting error while executing. #5307
Copy link
Copy link
Closed
Labels
Resolution-FixedThe issue is fixed.The issue is fixed.WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer
Milestone
Description
Executing Install-PowerShellRemoting.ps1 script gives an error bit seems to complete OK.
So, I think the script still valid and need to be fix.
Steps to reproduce
- Open PowerShell Core Beta 9 - pwsh:
- Execute following script file :
.\Install-PowerShellRemoting.ps1Expected behavior
Script to complete with out any errors.
Actual behavior
Shows errors in the begining:
PS C:\Program Files\PowerShell\6.0.0-beta.9> .\Install-PowerShellRemoting.ps1
Get-Content : Cannot find path 'C:\Program Files\PowerShell\6.0.0-beta.9\Powershell.Version' because it does not exist.
At C:\Program Files\PowerShell\6.0.0-beta.9\Install-PowerShellRemoting.ps1:136 char:23
+ $versionString = (Get-Content $targetPsVersionFilePath).Trim()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : ObjectNotFound: (C:\Program File...ershell.Version:String) [Get-Content], ItemNotFoundEx
ception
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand
You cannot call a method on a null-valued expression.
At C:\Program Files\PowerShell\6.0.0-beta.9\Install-PowerShellRemoting.ps1:136 char:5
+ $versionString = (Get-Content $targetPsVersionFilePath).Trim()
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At C:\Program Files\PowerShell\6.0.0-beta.9\Install-PowerShellRemoting.ps1:137 char:8
+ if($versionString.StartsWith("v"))
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At C:\Program Files\PowerShell\6.0.0-beta.9\Install-PowerShellRemoting.ps1:141 char:5
+ $index = $versionString.LastIndexOf(".")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At C:\Program Files\PowerShell\6.0.0-beta.9\Install-PowerShellRemoting.ps1:142 char:5
+ $version = $versionString.Substring(0,$index)
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
You cannot call a method on a null-valued expression.
At C:\Program Files\PowerShell\6.0.0-beta.9\Install-PowerShellRemoting.ps1:143 char:5
+ $revision = $versionString.Substring($index).split("-")
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvokeMethodOnNull
Cannot index into a null array.
At C:\Program Files\PowerShell\6.0.0-beta.9\Install-PowerShellRemoting.ps1:144 char:5
+ $version= $version + $revision[0]
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [], RuntimeException
+ FullyQualifiedErrorId : NullArray
VERBOSE: Using PowerShell Version:
VERBOSE: Performing the operation "Copy File" on target "Item: C:\Program Files\PowerShell\6.0.0-beta.9\pwrshplugin.dll
Destination: C:\WINDOWS\System32\PowerShell\pwrshplugin.dll".
Environment data
Windows 10 Insider Edition Build 17025
PS C:\Program Files\PowerShell\6.0.0-beta.9> $PSVersionTable
Name Value
---- -----
PSVersion 6.0.0-beta.9
PSEdition Core
GitCommitId v6.0.0-beta.9
OS Microsoft Windows 10.0.16299
Platform Win32NT
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
WSManStackVersion 3.0
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
Resolution-FixedThe issue is fixed.The issue is fixed.WG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer

Activity
daxian-dbw commentedon Nov 2, 2017
This has been fixed in our repo but we need to create a new package of psrp.windows.
SteveL-MSFT commentedon Nov 2, 2017
Dongbo Wang (@daxian-dbw) It seems that the script is only picked up when we build the native windows binaries. That doesn't seem right as we may update the script without needing to build the native windows binaries.
daxian-dbw commentedon Nov 2, 2017
Good point. We can separate those two. I will take this issue.