powershell
차이
문서의 선택한 두 판 사이의 차이를 보여줍니다.
| 양쪽 이전 판이전 판다음 판 | 이전 판 | ||
| powershell [2020/04/09 02:47] – rex8312 | powershell [2024/03/23 02:38] (현재) – 바깥 편집 127.0.0.1 | ||
|---|---|---|---|
| 줄 21: | 줄 21: | ||
| </ | </ | ||
| + | * credential 생성 | ||
| + | * https:// | ||
| + | |||
| + | <code powershell> | ||
| + | # 암호입력 | ||
| + | $secureString = Read-Host -AsSecureString | ||
| + | # 문자열로 변환 | ||
| + | $secureString | ConvertFrom-SecureString | ||
| + | |||
| + | # credential.txt에 저장 | ||
| + | Read-Host -AsSecureString | ConvertFrom-SecureString | Set-Content " | ||
| + | # creadential.txt에서 credential 복원 | ||
| + | Set-Variable -Name user -Value 유저 | ||
| + | Set-Variable -Name ip -Value ??? | ||
| + | $secureString = Get-Content " | ||
| + | $cred = New-Object System.Management.Automation.PSCredential -ArgumentList $user, $secureString | ||
| + | $session = New-PSSession -ComputerName $ip -Credential $cred | ||
| + | # Invoke-Command -ComputerName $ip -ScriptBlock { cmd /c " | ||
| + | </ | ||
powershell.1586400420.txt.gz · 마지막으로 수정됨: (바깥 편집)