diff --git a/test/powershell/Modules/Microsoft.PowerShell.Management/TimeZone.Tests.ps1 b/test/powershell/Modules/Microsoft.PowerShell.Management/TimeZone.Tests.ps1
index cc1652ecd0..a4e64f28cb 100644
--- a/test/powershell/Modules/Microsoft.PowerShell.Management/TimeZone.Tests.ps1
+++ b/test/powershell/Modules/Microsoft.PowerShell.Management/TimeZone.Tests.ps1
@@ -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 {
@@ -230,4 +235,3 @@ try {
finally {
$global:PSDefaultParameterValues = $defaultParamValues
}
-
diff --git a/test/powershell/Modules/Microsoft.WSMan.Management/ConfigProvider.Tests.ps1 b/test/powershell/Modules/Microsoft.WSMan.Management/ConfigProvider.Tests.ps1
index 0391c217f4..d2d8426549 100644
--- a/test/powershell/Modules/Microsoft.WSMan.Management/ConfigProvider.Tests.ps1
+++ b/test/powershell/Modules/Microsoft.WSMan.Management/ConfigProvider.Tests.ps1
@@ -366,10 +366,18 @@ Describe "WSMan Config Provider" -Tag Feature,RequireAdminOnWindows {
-
"@
+ $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