Quantcast
Channel: Systems Management - Wiki
Viewing all articles
Browse latest Browse all 1292

OMCI Sample Scripts

$
0
0
Revision 40 posted to Systems Management - Wiki by Dell - Sharmad N on 6/3/2013 4:46:31 AM

Feel free to test these scripts in your test environment, and modify to your needs for production. Refer to the OMCI page for links to the user guide, reference guide, and other OMCI documentation.

Sample VBScripts

The OMCI White Paper contains several example VBScripts:

  • Clear Chassis Intrusion alert
  • Disable Desktop Messages for Fan alerts
  • Disable Desktop Messages for All Alerts
  • Enable Trusted Platform Module
  • Get/Set Boot Order
  • Change/Set the BIOS Admin Password
  • Change/Set the BIOS Boot Password

The OMCI Documentation (User Guide and Reference Guide) contains the following VBScript examples:

  • Clear Chassis Intrusion Status
  • Disable Desktop Messages for All Alerts
  • Remote System Shutdown
  • Remote System Restart
  • Remote BIOS Update
  • Enabling PXE Boot on the Next Reboot
  • Enabling Wakeup on LAN
  • Retrieving Service Tag, Asset Tag, and BIOS Revision
  • Changing BIOS Password

OMCI 8.0 Sample Scripts


Read the WhitePaper and Download Sample Scripts - How to Enable Trusted Platform Module (TPM) on Dell Business Client Systems

Sample PowerShell Scripts for OMCI 7.x and earlier

The following table contains one-line script examples using the Microsoft® Windows® PowerShell™ command-line shell.

PowerShell CommandDescription
gwmi -namespace root\dellomci -listQueries the local system for all classes in the root\dellomci namespace
gwmi -namespace root\dellomci -list -computer COMPUTER1Queries COMPUTER1 for all classes in the root\dellomci namespace
gwmi -namespace root\dellomci dell_chassisDisplays all properties and values of the Dell_Chassis class
(gwmi -namespace root\dellomci dell_SMBIOSSEttings).ChassisIntrusionStatusDisplay Chassis Intrusion Status for the local system
(gwmi -namespace root\dellomci dell_SMBIOSSEttings) | foreach{$_.ChassisIntrusionStatus=5; $_.put()}Clear the Chassis Intrusion Status
gwmi -namespace root\dellomci Dell_IndicationStaticValues | foreach {$_.MaxDisplayNotifications=0 ; $_.Put()}Disable all msgbox alerts for Dell OMCI on client
gwmi -namespace root\dellomci Dell_Configuration | foreach {$_.ForcePXEonNextBoot=3; $_.Put()}Force Boot to PXE on next restart
gwmi -namespace root\dellomci Dell_SMBIOSSEttings | foreach {$_.WakeUpOnLAN=6; $_.WakeupOnLANMethod=3; $_.Put()}Enable Wake-On-LAN
gwmi -namespace root\dellomci dell_systemsummaryDisplay Summary information (BIOS Date, Version, Asset Tag, Service Tag, Model Information, and so on)
gwmi -namespace root\dellomci Dell_BootDeviceSequence | ft BootOrder, BootDeviceNameDisplay a table of boot order
((gwmi -namespace root\dellomci Dell_BootDeviceSequence) | where {$_.BootDeviceName -eq "Onboard or USB CD-ROM Drive"} ) | foreach {$_.BootOrder=1 ; $_.Put()}Set the CD-ROM Drive to #1 position of boot sequence.

Sample Powershell Scripts for OMCI 8.x and newer

Remember to use an elevated command window.

Powershell CommandsDescription
gwmi -namespace root\dcim\sysman -listQueries the local system for all classes in the root\dcim\sysman namespace
gwmi -namespace root\dcim\sysman -list -computer COMPUTER1Queries COMPUTER1 for all classes in the root\dcim\sysman namespace
gwmi -namespace root\dcim\sysman dcim_chassisDisplays all properties and values of the dcim_chassis class
gwmi DCIM_BIOSEnumeration -namespace root\dcim\sysman -filter "AttributeName='Wake On LAN'"Displays the Wake On Lan setting
(gwmi DCIM_BIOSService -namespace root\dcim\sysman).SetBIOSAttributes($null,$null,"Wake On LAN","4")Sets the Wake On LAN setting to 4 for systems without a BIOS password
Possible values are:
1 - Disable
2 - Add-in
3 - On board
4 - LAN
5 - PXE boot enable
6 - LAN or WLAN
7 - WLAN only
(gwmi DCIM_BIOSService -namespace root\dcim\sysman).SetBIOSAttributes($null,$null,"Wake On LAN","4","password")Sets the Wake On LAN setting to 4 for systems that have a BIOS password
Possible values are:
1 - Disable
2 - Add-in
3 - On board
4 - LAN
5 - PXE boot enable
6 - LAN or WLAN
7 - WLAN only
gwmi dcim_chassis -namespace root\dcim\sysman tagDisplays the Service Tag
gwmi dcim_chassis -namespace root\dcim\sysman ElementNameDisplays the Asset Tag
gwmi dcim_chassis -namespace root\dcim\sysman PropertyOwnershipTagDisplays the Property Ownership Tag
(gwmi DCIM_Chassis -namespace root\dcim\sysman).ChangeAssetTag("newAstg")Sets the Asset Tag
(gwmi DCIM_Chassis -namespace root\dcim\sysman).ChangePropertyOwnershipTag("PropOtag")Sets the Property Ownership Tag



Frequently Asked Questions


Q: How can I browse WMI using a GUI?
A: You can use WMI Administrative Tools, PowerShell ScriptOMatic, or PowerShell WMI Explorer.

Q: I'm having trouble querying OMCI information through a GUI, VBScript, and PowerShell.
A: Check Permissions; you may need to Run as Administrator to have sufficient access. Also, ensure that OMCI is installed (Check Add/Remove Programs).

Links


Tags: openmanage, PowerShell, OMCI, Scripts, vbscript

Viewing all articles
Browse latest Browse all 1292

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>