성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Get Started with Milvus Vector DB i...
[정성태] cyberark/PipeViewer - A tool that...
[정성태] WinForms in a 64-Bit world – our st...
[정성태] 예제에서 SELECT_SQL도 내부적으로는 SqlCommand/...
[victor] SELECT_LINQ SELECT_SQL 같은 쿼리인...
[victor] 답변 갑사합니다. 예외(Exception)가 났습니다. ...
[정성태] 일단, 위의 방식대로 하면 예외(Exception) 없이 잘 동...
[정성태] Windows 10 (버전 1809)에 이런 기능이 ^^ 추가되...
[정성태] pde windbg extension ; https://lea...
[정성태] // GetEnumerator extensions for Ran...
글쓰기
제목
이름
암호
전자우편
HTML
홈페이지
유형
제니퍼 .NET
닷넷
COM 개체 관련
스크립트
VC++
VS.NET IDE
Windows
Team Foundation Server
디버깅 기술
오류 유형
개발 환경 구성
웹
기타
Linux
Java
DDK
Math
Phone
Graphics
사물인터넷
부모글 보이기/감추기
내용
<div style='display: inline'> <h1 style='font-family: Malgun Gothic, Consolas; font-size: 20pt; color: #006699; text-align: center; font-weight: bold'>WMI Namespace를 열거하고, 그 안에 정의된 클래스를 열거하는 방법</h1> <p> 검색해 보면 Namespace 열거에 대해 Get-WmiObject 명령어를 사용하면 된다고 합니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Quick Hits: List All Available WMI Namespaces Using PowerShell ; <a target='tab' href='https://learn-powershell.net/2014/05/09/quick-hits-list-all-available-wmi-namespaces-using-powershell/'>https://learn-powershell.net/2014/05/09/quick-hits-list-all-available-wmi-namespaces-using-powershell/</a> </pre> <br /> 따라서 다음과 같이 PS shell에서 실행하면,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Windows\System32> <span style='color: blue; font-weight: bold'>Get-WmiObject -Namespace Root -Class __Namespace | Select-Object -Property Name</span> Name ---- subscription DEFAULT CIMV2 msdtc Cli MicrosoftIISv2 SECURITY HyperVCluster SecurityCenter2 RSOP PEH WebAdministration StandardCimv2 WMI directory Policy virtualization Interop Hardware ServiceModel SecurityCenter Microsoft aspnet Appv </pre> <br /> 최상위 WMI 네임스페이스를 열거하게 됩니다. 참고로, 계층을 이루는 네임스페이스를 하위까지 모두 열거하고 싶다면 "<a target='tab' href='https://learn-powershell.net/2014/05/09/quick-hits-list-all-available-wmi-namespaces-using-powershell/'>Quick Hits: List All Available WMI Namespaces Using PowerShell</a>" 블로거가 공개한 명령어를,<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Get All WMI Namespaces ; <a target='tab' href='https://gallery.technet.microsoft.com/scriptcenter/Get-All-WMI-Namespaces-5471ad75'>https://gallery.technet.microsoft.com/scriptcenter/Get-All-WMI-Namespaces-5471ad75</a> </pre> <br /> 이렇게 사용하면 됩니다. ^^<br /> <br /> <pre style='height: 400px; margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\ps> <span style='color: blue; font-weight: bold'>Import-Module .\Get-WMINamespace.ps1</span> PS C:\ps> <span style='color: blue; font-weight: bold'>Get-WMINamespace -Recurse</span> Computername Namespace ------------ --------- TESTPC ROOT\subscription TESTPC ROOT\subscription\ms_411 TESTPC ROOT\subscription\ms_409 TESTPC ROOT\subscription\ms_412 TESTPC ROOT\DEFAULT TESTPC ROOT\DEFAULT\ms_411 TESTPC ROOT\DEFAULT\ms_409 TESTPC ROOT\DEFAULT\ms_412 TESTPC ROOT\CIMV2 TESTPC ROOT\CIMV2\mdm TESTPC ROOT\CIMV2\mdm\dmmap TESTPC ROOT\CIMV2\mdm\MS_411 TESTPC ROOT\CIMV2\mdm\MS_409 TESTPC ROOT\CIMV2\mdm\MS_412 TESTPC ROOT\CIMV2\Security TESTPC ROOT\CIMV2\Security\MicrosoftTpm TESTPC ROOT\CIMV2\Security\MicrosoftVolumeEncryption TESTPC ROOT\CIMV2\ms_411 TESTPC ROOT\CIMV2\power TESTPC ROOT\CIMV2\power\ms_411 TESTPC ROOT\CIMV2\power\ms_409 TESTPC ROOT\CIMV2\power\ms_412 TESTPC ROOT\CIMV2\ms_409 TESTPC ROOT\CIMV2\TerminalServices TESTPC ROOT\CIMV2\TerminalServices\ms_411 TESTPC ROOT\CIMV2\TerminalServices\ms_409 TESTPC ROOT\CIMV2\TerminalServices\ms_412 TESTPC ROOT\CIMV2\ms_412 TESTPC ROOT\msdtc TESTPC ROOT\Cli TESTPC ROOT\Cli\MS_411 TESTPC ROOT\Cli\MS_409 TESTPC ROOT\Cli\MS_412 TESTPC ROOT\MicrosoftIISv2 TESTPC ROOT\MicrosoftIISv2\MS_411 TESTPC ROOT\MicrosoftIISv2\MS_409 TESTPC ROOT\MicrosoftIISv2\MS_412 TESTPC ROOT\SECURITY TESTPC ROOT\HyperVCluster TESTPC ROOT\HyperVCluster\v2 TESTPC ROOT\HyperVCluster\v2\ms_411 TESTPC ROOT\HyperVCluster\v2\ms_409 TESTPC ROOT\HyperVCluster\v2\ms_412 TESTPC ROOT\SecurityCenter2 TESTPC ROOT\RSOP TESTPC ROOT\RSOP\User TESTPC ROOT\RSOP\User\ms_411 TESTPC ROOT\RSOP\User\ms_409 TESTPC ROOT\RSOP\User\S_1_5_21_1280880998_3941059... TESTPC ROOT\RSOP\User\ms_412 TESTPC ROOT\RSOP\Computer TESTPC ROOT\RSOP\Computer\ms_411 TESTPC ROOT\RSOP\Computer\ms_409 TESTPC ROOT\RSOP\Computer\ms_412 TESTPC ROOT\PEH TESTPC ROOT\WebAdministration TESTPC ROOT\WebAdministration\MS_411 TESTPC ROOT\WebAdministration\MS_409 TESTPC ROOT\WebAdministration\MS_412 TESTPC ROOT\StandardCimv2 TESTPC ROOT\StandardCimv2\MS_411 TESTPC ROOT\StandardCimv2\MS_409 TESTPC ROOT\StandardCimv2\MS_412 TESTPC ROOT\StandardCimv2\embedded TESTPC ROOT\StandardCimv2\embedded\MS_411 TESTPC ROOT\StandardCimv2\embedded\MS_409 TESTPC ROOT\StandardCimv2\embedded\MS_412 TESTPC ROOT\WMI TESTPC ROOT\WMI\ms_411 TESTPC ROOT\WMI\ms_409 TESTPC ROOT\WMI\ms_412 TESTPC ROOT\directory TESTPC ROOT\directory\LDAP TESTPC ROOT\directory\LDAP\ms_411 TESTPC ROOT\directory\LDAP\ms_409 TESTPC ROOT\directory\LDAP\ms_412 TESTPC ROOT\Policy TESTPC ROOT\Policy\ms_411 TESTPC ROOT\Policy\ms_409 TESTPC ROOT\Policy\ms_412 TESTPC ROOT\virtualization TESTPC ROOT\virtualization\v2 TESTPC ROOT\virtualization\v2\ms_411 TESTPC ROOT\virtualization\v2\ms_409 TESTPC ROOT\virtualization\v2\ms_412 TESTPC ROOT\Interop TESTPC ROOT\Interop\ms_411 TESTPC ROOT\Interop\ms_409 TESTPC ROOT\Interop\ms_412 TESTPC ROOT\Hardware TESTPC ROOT\Hardware\ms_411 TESTPC ROOT\Hardware\ms_409 TESTPC ROOT\Hardware\ms_412 TESTPC ROOT\ServiceModel TESTPC ROOT\ServiceModel\ms_411 TESTPC ROOT\SecurityCenter TESTPC ROOT\Microsoft TESTPC ROOT\Microsoft\SqlServer TESTPC ROOT\Microsoft\SqlServer\ComputerManagement15 TESTPC ROOT\Microsoft\SqlServer\ComputerManagemen... TESTPC ROOT\Microsoft\SqlServer\ServerEvents TESTPC ROOT\Microsoft\SqlServer\ServerEvents\MSSQ... TESTPC ROOT\Microsoft\SqlServer\ComputerManagement14 TESTPC ROOT\Microsoft\SqlServer\ComputerManagemen... TESTPC ROOT\Microsoft\SqlServer\ComputerManagement13 TESTPC ROOT\Microsoft\SqlServer\ComputerManagemen... TESTPC ROOT\Microsoft\HomeNet TESTPC ROOT\Microsoft\protectionManagement TESTPC ROOT\Microsoft\Windows TESTPC ROOT\Microsoft\Windows\RemoteAccess TESTPC ROOT\Microsoft\Windows\RemoteAccess\Client TESTPC ROOT\Microsoft\Windows\RemoteAccess\Client... TESTPC ROOT\Microsoft\Windows\RemoteAccess\Client... TESTPC ROOT\Microsoft\Windows\RemoteAccess\Client... TESTPC ROOT\Microsoft\Windows\Dns TESTPC ROOT\Microsoft\Windows\Dns\MS_411 TESTPC ROOT\Microsoft\Windows\Dns\MS_409 TESTPC ROOT\Microsoft\Windows\Dns\MS_412 TESTPC ROOT\Microsoft\Windows\Powershellv3 TESTPC ROOT\Microsoft\Windows\Powershellv3\MS_411 TESTPC ROOT\Microsoft\Windows\Powershellv3\MS_409 TESTPC ROOT\Microsoft\Windows\Powershellv3\MS_412 TESTPC ROOT\Microsoft\Windows\Hgs TESTPC ROOT\Microsoft\Windows\Hgs\MS_411 TESTPC ROOT\Microsoft\Windows\Hgs\MS_409 TESTPC ROOT\Microsoft\Windows\Hgs\MS_412 TESTPC ROOT\Microsoft\Windows\WindowsUpdate TESTPC ROOT\Microsoft\Windows\WindowsUpdate\MS_411 TESTPC ROOT\Microsoft\Windows\WindowsUpdate\MS_409 TESTPC ROOT\Microsoft\Windows\WindowsUpdate\MS_412 TESTPC ROOT\Microsoft\Windows\DeviceGuard TESTPC ROOT\Microsoft\Windows\DeviceGuard\MS_411 TESTPC ROOT\Microsoft\Windows\DeviceGuard\MS_409 TESTPC ROOT\Microsoft\Windows\DeviceGuard\MS_412 TESTPC ROOT\Microsoft\Windows\TaskScheduler TESTPC ROOT\Microsoft\Windows\TaskScheduler\MS_411 TESTPC ROOT\Microsoft\Windows\TaskScheduler\MS_409 TESTPC ROOT\Microsoft\Windows\TaskScheduler\MS_412 TESTPC ROOT\Microsoft\Windows\DesiredStateConfigu... TESTPC ROOT\Microsoft\Windows\DesiredStateConfigu... TESTPC ROOT\Microsoft\Windows\SmbWitness TESTPC ROOT\Microsoft\Windows\Wdac TESTPC ROOT\Microsoft\Windows\Wdac\MS_411 TESTPC ROOT\Microsoft\Windows\Wdac\MS_409 TESTPC ROOT\Microsoft\Windows\Wdac\MS_412 TESTPC ROOT\Microsoft\Windows\winrm TESTPC ROOT\Microsoft\Windows\AppBackgroundTask TESTPC ROOT\Microsoft\Windows\AppBackgroundTask\M... TESTPC ROOT\Microsoft\Windows\AppBackgroundTask\M... TESTPC ROOT\Microsoft\Windows\AppBackgroundTask\M... TESTPC ROOT\Microsoft\Windows\PS_MMAgent TESTPC ROOT\Microsoft\Windows\PS_MMAgent\MS_411 TESTPC ROOT\Microsoft\Windows\PS_MMAgent\MS_409 TESTPC ROOT\Microsoft\Windows\PS_MMAgent\MS_412 TESTPC ROOT\Microsoft\Windows\Storage TESTPC ROOT\Microsoft\Windows\Storage\PT TESTPC ROOT\Microsoft\Windows\Storage\PT\Alt TESTPC ROOT\Microsoft\Windows\Storage\MS_411 TESTPC ROOT\Microsoft\Windows\Storage\MS_409 TESTPC ROOT\Microsoft\Windows\Storage\Providers_v2 TESTPC ROOT\Microsoft\Windows\Storage\MS_412 TESTPC ROOT\Microsoft\Windows\HardwareManagement TESTPC ROOT\Microsoft\Windows\HardwareManagement\... TESTPC ROOT\Microsoft\Windows\HardwareManagement\... TESTPC ROOT\Microsoft\Windows\HardwareManagement\... TESTPC ROOT\Microsoft\Windows\SMB TESTPC ROOT\Microsoft\Windows\SMB\MS_411 TESTPC ROOT\Microsoft\Windows\SMB\MS_409 TESTPC ROOT\Microsoft\Windows\SMB\MS_412 TESTPC ROOT\Microsoft\Windows\EventTracingManagement TESTPC ROOT\Microsoft\Windows\EventTracingManagem... TESTPC ROOT\Microsoft\Windows\EventTracingManagem... TESTPC ROOT\Microsoft\Windows\EventTracingManagem... TESTPC ROOT\Microsoft\Windows\DesiredStateConfigu... TESTPC ROOT\Microsoft\Windows\DesiredStateConfigu... TESTPC ROOT\Microsoft\Windows\DesiredStateConfigu... TESTPC ROOT\Microsoft\Windows\DesiredStateConfigu... TESTPC ROOT\Microsoft\Windows\Attestation TESTPC ROOT\Microsoft\Windows\Attestation\MS_411 TESTPC ROOT\Microsoft\Windows\Attestation\MS_409 TESTPC ROOT\Microsoft\Windows\Attestation\MS_412 TESTPC ROOT\Microsoft\Windows\CI TESTPC ROOT\Microsoft\Windows\CI\MS_411 TESTPC ROOT\Microsoft\Windows\CI\MS_409 TESTPC ROOT\Microsoft\Windows\CI\MS_412 TESTPC ROOT\Microsoft\Windows\DeliveryOptimization TESTPC ROOT\Microsoft\Windows\Defender TESTPC ROOT\Microsoft\Windows\Defender\MS_411 TESTPC ROOT\Microsoft\Windows\Defender\MS_409 TESTPC ROOT\Microsoft\Windows\Defender\MS_412 TESTPC ROOT\Microsoft\SecurityClient TESTPC ROOT\Microsoft\Uev TESTPC ROOT\aspnet TESTPC ROOT\Appv </pre> <br /> <hr style='width: 50%' /><br /> <br /> 다음으로, 특정 네임스페이스에 속한 클래스는 Get-CimClass 명령어를 사용하면 됩니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > Get-CimClass ; <a target='tab' href='https://docs.microsoft.com/en-us/powershell/module/cimcmdlets/get-cimclass'>https://docs.microsoft.com/en-us/powershell/module/cimcmdlets/get-cimclass</a> </pre> <br /> 대개의 경우 결과가 많기 때문에 findstr 등의 필터를 이용하는 것이 좋습니다.<br /> <br /> <pre style='margin: 10px 0px 10px 10px; padding: 10px 0px 10px 10px; background-color: #fbedbb; overflow: auto; font-family: Consolas, Verdana;' > PS C:\Windows\System32> <span style='color: blue; font-weight: bold'>Get-CimClass -Namespace root\WMI | findstr SystemConfig_V2_Network</span> </pre> </p><br /> <br /><hr /><span style='color: Maroon'>[이 글에 대해서 여러분들과 의견을 공유하고 싶습니다. 틀리거나 미흡한 부분 또는 의문 사항이 있으시면 언제든 댓글 남겨주십시오.]</span> </div>
첨부파일
스팸 방지용 인증 번호
4653
(왼쪽의 숫자를 입력해야 합니다.)