mirror of
https://github.com/aphrody-labs/PowerShell.git
synced 2026-10-17 12:45:47 +00:00
Fix Restart-Computer to work on localhost when WinRM is not present (#9160)
This commit is contained in:
1 parent
b4ebf63335
commit
0fe9af4856
2 files changed
+34
-11
No files matched your search
@@ -975,9 +975,15 @@ namespace System.Management.Automation
|
||||
string computerName,
|
||||
PSCredential credential,
|
||||
string authentication,
|
||||
bool isLocalHost,
|
||||
CancellationToken cancellationToken,
|
||||
PSCmdlet cmdlet)
|
||||
{
|
||||
if (isLocalHost)
|
||||
{
|
||||
return CimSession.Create(null);
|
||||
}
|
||||
|
||||
var sessionOptions = new CimSessionOptions();
|
||||
|
||||
CimCredential cimCredentials = GetCimCredentials(authentication, credential);
|
||||
|
||||
Reference in new issue
Block a user