mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Merge pull request #1661 from PowerShell/dongbo/get-pssession
Fix if/def guards to allow engine to load WsMan and Diagnostics snapins by default when RunspaceConfiguration is used to create a runspace
This commit is contained in:
commit
9a0436b856
2 files changed
+11
-2
No files matched your search
@@ -3,5 +3,14 @@ Describe 'Basic engine APIs' -Tags "CI" {
|
||||
It 'can create default instance' {
|
||||
[powershell]::Create() | Should Not Be $null
|
||||
}
|
||||
|
||||
It "can load the default snapin 'Microsoft.WSMan.Management'" -skip:(-not $IsWindows) {
|
||||
$ps = [powershell]::Create()
|
||||
$ps.AddScript("Get-Command -Name Test-WSMan") > $null
|
||||
|
||||
$result = $ps.Invoke()
|
||||
$result.Count | Should Be 1
|
||||
$result[0].PSSnapIn.Name | Should Be "Microsoft.WSMan.Management"
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user