Skip to content

Commit

Permalink
Add param IgnoreAzureLabsources New-LabPSSession
Browse files Browse the repository at this point in the history
  • Loading branch information
nyanhp committed Jun 17, 2020
1 parent 9ee90a1 commit 14669a8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
6 changes: 4 additions & 2 deletions AutomatedLab/AutomatedLabRemoting.psm1
Expand Up @@ -22,7 +22,9 @@ function New-LabPSSession

[int]$Interval = 5,

[switch]$UseSSL
[switch]$UseSSL,

[switch]$IgnoreAzureLabSources
)

begin
Expand Down Expand Up @@ -170,7 +172,7 @@ function New-LabPSSession
if ($internalSession)
{
if ($internalSession.Runspace.ConnectionInfo.AuthenticationMechanism -eq 'CredSsp' -and
-not $internalSession.ALLabSourcesMapped -and
-not (-not $IgnoreAzureLabSources .IsPresent -and $internalSession.ALLabSourcesMapped) -and
(Get-LabVM -ComputerName $internalSession.LabMachineName).HostType -eq 'Azure'
)
{
Expand Down
2 changes: 1 addition & 1 deletion PSFileTransfer/PSFileTransfer.psm1
Expand Up @@ -507,7 +507,7 @@ function Copy-LabFileItem
continue
}

$session = New-LabPSSession -ComputerName $machine
$session = New-LabPSSession -ComputerName $machine -IgnoreAzureLabSources
foreach ($p in $Path)
{

Expand Down

0 comments on commit 14669a8

Please sign in to comment.