Skip to content
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,13 @@ Describe "Get-Timezone test cases" -Tags "CI" {
}

try {
$defaultParamValues = $PSDefaultParameterValues.Clone()
$PSDefaultParameterValues["it:skip"] = !$IsWindows
$defaultParamValues = $PSdefaultParameterValues.Clone()

# Set-TimeZone fails due to missing ApiSet dependency on Windows Server 2012 R2.
$osInfo = [System.Environment]::OSVersion.Version
$isSrv2k12R2 = $osInfo.Major -eq 6 -and $osInfo.Minor -eq 3

$PSDefaultParameterValues["it:skip"] = !$IsWindows -or $isSrv2k12R2

Describe "Set-Timezone test case: call by single Id" -Tags @('CI', 'RequireAdminOnWindows') {
BeforeAll {
Expand Down Expand Up @@ -230,4 +235,3 @@ try {
finally {
$global:PSDefaultParameterValues = $defaultParamValues
}

Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,18 @@ Describe "WSMan Config Provider" -Tag Feature,RequireAdminOnWindows {
<Capability Type="Shell"></Capability>
</Resource>
</Resources>
<Quotas MaxIdleTimeoutms="2147483646" MaxConcurrentUsers="2147483646" IdleTimeoutms="6200000" MaxProcessesPerShell="2147483646"
<Quotas MaxIdleTimeoutms="2147483646" MaxConcurrentUsers="{0}" IdleTimeoutms="6200000" MaxProcessesPerShell="2147483646"
MaxMemoryPerShellMB="2147483646" MaxConcurrentCommandsPerShell="2147483646" MaxShells="2147483646" MaxShellsPerUser="2147483646"></Quotas>
</PlugInConfiguration>
"@
$osInfo = [System.Environment]::OSVersion.Version
$isSrv2k12R2 = $osInfo.Major -eq 6 -and $osInfo.Minor -eq 3

# On Windows Server 2012R2 MaxConcurrentUsers is limited to 100.
$maxConcurrentUsers = if ($isSrv2k12R2) { '50' } else { '2147483646' }

$fileXml = $fileXml -f $maxConcurrentUsers

Set-Content -Path $testdrive\plugin.xml -Value $fileXml
try {
$plugin = New-Item -Path WSMan:\localhost\Plugin -File $testdrive\plugin.xml -Name TestPlugin2
Expand Down