The PowerShell WMI capability is quite advanced and provides a vast scope for processing a returned recordset easily and effectively.
Here are just three types of Powershell WMI calls using different namespaces.
Return details about a service
get-wmiobject win32_service -filter "name='alerter'"
Return a users first name from Active Directory
(Get-WmiObject -namespace "root\directory\ldap" -class ds_user -filter "ds_Cn='[UserID]'").DS_givenname
Return details about a specified SMS package
Get-WmiObject -computer [SMSServer] -namespace root\sms\site_[SiteCode] -Query "SELECT * FROM SMS_Package WHERE PackageID='[PackageID]'"
Blog Index
-
▼
2008
(40)
-
▼
May
(10)
- Powershell WMI one-liners
- Installing device drivers without the device being...
- Effective permissions may be reported incorrectly
- MDT 2008 Storage Drivers - 0x0000007B error
- NVIDIA Screen resolution resets
- Mandatory ZTI advertisement does not run
- You receive message "Please wait while the domain ...
- Decrypt / Encrypt string in ROT-13
- Understanding the Most Frequently Used (MFU) regis...
- Windows XP reboots during setup
-
▼
May
(10)
Tuesday, May 27, 2008
Powershell WMI one-liners
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment