mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Register-PSSessionConfiguration fails if SesionConfig folder doesn't exist (#4271)
This commit is contained in:
@@ -964,7 +964,13 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
string destPath = System.IO.Path.Combine(Utils.DefaultPowerShellAppBase, "SessionConfig",
|
||||
string destFolder = System.IO.Path.Combine(Utils.DefaultPowerShellAppBase, "SessionConfig");
|
||||
if (!Directory.Exists(destFolder))
|
||||
{
|
||||
Directory.CreateDirectory(destFolder);
|
||||
}
|
||||
|
||||
string destPath = System.IO.Path.Combine(destFolder,
|
||||
shellName + "_" + sessionGuid.ToString() + StringLiterals.PowerShellDISCFileExtension);
|
||||
if (string.Equals(ProcessorArchitecture, "x86", StringComparison.OrdinalIgnoreCase))
|
||||
{
|
||||
|
||||
@@ -2108,7 +2108,10 @@ Describe "Import-PSSession on Restricted Session" -tags "Feature","RequireAdminO
|
||||
}
|
||||
}
|
||||
|
||||
It "Verifies that Import-PSSession works on a restricted session" {
|
||||
# Blocked by https://github.com/PowerShell/PowerShell/issues/4275
|
||||
# Need a way to created restricted endpoint based on a different endpoint other than microsoft.powershell which points
|
||||
# to Windows PowerShell 5.1
|
||||
It "Verifies that Import-PSSession works on a restricted session" -Pending {
|
||||
|
||||
$errorVariable = $null
|
||||
Import-PSSession -Session $session -AllowClobber -ErrorVariable $errorVariable
|
||||
|
||||
Reference in New Issue
Block a user