powershell에서 -computername을 사용할 때는 원격에 RemoteRegistry 서비스가 실행중이어야 한다


Get-Process -ComputerName client

Get-Service -ComputerName server

이렇게 명령을 내렸는데 “Couldn’t connect to remote machine”라는 메시지가 발생하면서 접속이 안되는 일이 있다.

이런 이유는 원격 컴퓨터의 서비스 중에서 RemoteRegistry 서비스가 시작되지 않았기 때문이다.

-ComputerName 파라메터는 Enable-PSRemoting -Force 설정과는 무관하다.

단지 원격 컴퓨터에 RemoteRegistry 서비스와 관려되어 있을 뿐이다

원하는 PowerShell 명령어 찾는 방법


<원하는 PowerShell 명령어 찾는 방법>
1) -Name
Get-Command -Name test-*
Get-Command -Name *-package

2) -CommandType
Get-Command -CommandType application/cmdlet/alias/function
Get-Command -CommandType application | Where-Object {$_.Name -like “.exe”} Get-Command -CommandType application | Where-Object {$_.Name -like “q.exe”}
Get-Command -CommandType application | Where-Object {$_.Name -like “.msc”} Get-Command -CommandType application | Where-Object {$_.Name -like “.cpl”}

3) -Parameter
Get-Command -ParameterName asstring
Get-Command -ParameterName filter

4) -Module
Get-Command -Module pscx
Get-Command -Module DNSServer

유용한 파워쉘 명령어



Get-WindowsDriver –Online –All


Export-WindowsDriver -Online -Destination c:\backup-drivers

<맬웨어 찾기>
Start-MpScan –ScanType QuickScan/FullScan –ScanPath “C:\Program Files”

<명령어 보기>
Get-Command -CommandType cmdlet/application/function/alias


Get-PSDrive
Get-PSDrive -PSProvider FileSystem/Alias/Registry

참고 영상: https://youtu.be/VFuobJbbDtU