성태의 닷넷 이야기
홈 주인
모아 놓은 자료
프로그래밍
질문/답변
사용자 관리
사용자
메뉴
아티클
외부 아티클
유용한 코드
온라인 기능
MathJax 입력기
최근 덧글
[정성태] Working with Rust Libraries from C#...
[정성태] Detecting blocking calls using asyn...
[정성태] 아쉽게도, 커뮤니티는 아니고 개인 블로그입니다. ^^
[정성태] 질문이 잘 이해가 안 됩니다. 우선, 해당 소스코드에서 ILis...
[양승조
] var대신 dinamic으로 선언해서 해결은 했습니다. 맞는 해...
[양승조
] 또 막혔습니다. ㅠㅠ var list = props[i].Ge...
[양승조
] 아. 감사합니다. 어제는 안됐던것 같은데....정신을 차려야겠네...
[정성태] "props[i].GetValue(props[i])" 코드에서 ...
[정성태] 저렇게 조각 코드 말고, 실제로 재현이 되는 예제 프로젝트를 압...
[정성태] Modules 창(Ctrl+Shift+U)을 띄워서, 해당 Op...
글쓰기
제목
이름
암호
전자우편
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>
첨부파일
스팸 방지용 인증 번호
1055
(왼쪽의 숫자를 입력해야 합니다.)