이 문서는 Bamboo 에서 Powershell을 통해 원격 서버로 접속하기 위한 설정을 공유하기 위해 작성되었다.
Powershell 리모트 접속 Enable
Enable-PSRemoting -Force |
리모트 접속을 위한 winrm 설정
winrm quickconfig |
접속 계정 Powershell PSSession 그룹 추가
Set-PSsessionConfiguration -ShowSecurityDescriptorUI -Name Microsoft.PowerShell |
신뢰할 수 있는 서버 목록 조회
Get-Item WSMan:\localhost\Client\TrustedHosts |
신뢰할 수 있는 서버 추가
Set-Item WSMan:\localhost\Clent\TrustedHosts -Value "server ip" -Force |
원격 서버 접속 테스트
$username = "admin" $password = ConvertTo-SecureString "password" -AsPlainText -Force $cred = New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $username, $password Enter-PSSession -ComputerName "server ip" -Credential $cred |