Skip to content

Commit 5ff669a

Browse files
Merge pull request #159 from dgoldman-msft/development
Update new-pssession.action.ps1
2 parents 1a9ec81 + 5d7747a commit 5ff669a

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

PSModuleDevelopment/internal/buildActions/new-pssession.action.ps1

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,7 @@
2121
$paramNewPSSession = @{ }
2222
if ($actualParameters.VMName) { $paramNewPSSession.VMName = $actualParameters.VMName }
2323
if ($actualParameters.ComputerName) { $paramNewPSSession.ComputerName = $actualParameters.ComputerName }
24+
if ($actualParameters.Port) { $paramNewPSSession.Port = $actualParameters.Port }
2425
if ($credential) { $paramNewPSSession.Credential = $credential }
2526

2627
try { $session = New-PSSession @paramNewPSSession -ErrorAction Stop }
@@ -30,12 +31,13 @@
3031
}
3132

3233
$params = @{
33-
Name = 'new-pssession'
34-
Action = $action
34+
Name = 'new-pssession'
35+
Action = $action
3536
Description = 'Establish a PSSession to a target computer and provide it as an artifact'
3637
Parameters = @{
3738
ComputerName = 'The Computer to connect to'
38-
VMName = 'The virtual machine to which to connect to via the HyperV VM Bus'
39+
Port = 'Port you want to connect to'
40+
VMName = 'The virtual machine to which to connect to via the HyperV VM Bus'
3941
CredentialPath = 'The path to the credentials to use for the connection. Use %ProjectRoot% to insert the folder path to where the buildfile is located'
4042
ArtifactName = '(mandatory) The name under which to publish the session as an artifact'
4143
}

0 commit comments

Comments
 (0)