Skip to content
This repository has been archived by the owner on Jun 16, 2021. It is now read-only.

fixing issue-63 #75

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 32 additions & 8 deletions WindowsCompatibility/WindowsCompatibility.psm1
Original file line number Diff line number Diff line change
Expand Up @@ -147,8 +147,11 @@ function Initialize-WinSession
$PassThru
)

[bool] $verboseFlag = $PSBoundParameters['Verbose']

[bool] $verboseFlag = $false
if ($PSBoundParameters['Verbose'])
{
$verboseFlag = $true
}
if ($ComputerName -eq ".")
{
$ComputerName = "localhost"
Expand Down Expand Up @@ -380,7 +383,11 @@ function Get-WinModule
$Full
)

[bool] $verboseFlag = $PSBoundParameters['Verbose']
[bool] $verboseFlag = $false
if ($PSBoundParameters['Verbose'])
{
$verboseFlag = $true
}

Write-Verbose -Verbose:$verboseFlag 'Connecting to compatibility session.'
$initializeWinSessionParameters = @{
Expand Down Expand Up @@ -474,7 +481,11 @@ function Import-WinModule
$PassThru
)

[bool] $verboseFlag = $PSBoundParameters['Verbose']
[bool] $verboseFlag = $False
if ($PSBoundParameters['Verbose'])
{
$verboseFlag = $true
}

Write-Verbose -Verbose:$verboseFlag "Connecting to compatibility session."
$initializeWinSessionParameters = @{
Expand Down Expand Up @@ -585,7 +596,11 @@ function Compare-WinModule
$Credential
)

[bool] $verboseFlag = $PSBoundParameters['Verbose']
[bool] $verboseFlag = $false
if ($PSBoundParameters['Verbose'])
{
$verboseFlag = $true
}

Write-Verbose -Verbose:$verboseFlag "Initializing compatibility session"
$initializeWinSessionParameters = @{
Expand Down Expand Up @@ -650,7 +665,11 @@ function Copy-WinModule
$Destination
)

[bool] $verboseFlag = $PSBoundParameters['Verbose']
[bool] $verboseFlag = $false
if ($PSBoundParameters['Verbose'])
{
$verboseFlag = $true
}
[bool] $whatIfFlag = $PSBoundParameters['WhatIf']
[bool] $confirmFlag = $PSBoundParameters['Confirm']

Expand Down Expand Up @@ -748,8 +767,12 @@ function Add-WindowsPSModulePath
return
}

[bool] $verboseFlag = $PSBoundParameters['Verbose']

[bool] $verboseFlag = $false
if ($PSBoundParameters['Verbose'])
{
$verboseFlag = $true
}

$paths = @(
$Env:PSModulePath -split [System.IO.Path]::PathSeparator
"${Env:UserProfile}\Documents\WindowsPowerShell\Modules"
Expand Down Expand Up @@ -779,3 +802,4 @@ function Add-WindowsPSModulePath

$Env:PSModulePath = $pathTable.Keys -join [System.IO.Path]::PathSeparator
}