Posted On April 26, 2021

PowerShell: CredSSP

kimconnect 0 comments
blog.KimConnect.com >> Codes >> PowerShell: CredSSP
# Part 1: enable client mode on the local jump box
$remoteComputer='SHERVER009'
Enable-WSManCredSSP Client -DelegateComputer $remoteComputer -Force

# Part 2: enable server mode at the destination machine
Enable-WSManCredSSP Server

# Part 3: execute WinRM command with CredSSP
$credentials = Get-Credential
Invoke-Command -ComputerName $remoteComputer -ScriptBlock {ping localhost} -Authentication CredSSP

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

PowerShell: Function to Wait for Service to Be Back Online (After Server Reboots)

Function waitForService{ $testSucceeded=(Test-NetConnection $server -port $port).TcpTestSucceeded $null=Set-PSBreakpoint -Variable rightNow -Mode Read -Action { $global:testSucceeded =…

PowerShell: Working With Arrays

Problem: elements of a System.Array couldn't be counted # Example output when an object is…

Virtual Machine Manager Error ID 23351 FirstBootDevice Invalid

When moving, importing, exporting Generation 2 template in VMM, the following error occurs when trying…