Grab our RSS feeds Follow us on Twitter Join our Facebook Group Connect with us on LinkedIn
myITforum.com, Powered by You.
you are not logged in

Articles

Newslinks

Links

Downloads

Site Services

Community Forums

Discussion Lists

Article Search

Newsletter

Web Blogs

FAQs

Live Support

myITforum TV

Take a Poll

Monthly Drawing

myITforum Network

User Group Directory

Our Partners

About Us

Register

Login

BRONZE PARTNER:

BRONZE PARTNER:



Industry News:




  Home : Articles : Scripting print | email | | Forums |   print | email | | Blogs |   print | email | | Wiki |   print | email | | FAQs |   print | email | Article Search  
Managing Dell BIOS settings: Resetting the chassis intrusion alert via script


Bookmark and Share

By: Dan Thomson
Posted On: 3/9/2006

Are you tired of your Dell OMCI clients sending out chassis intrusion alerts? Do you not want to visit each PC to clear the alert? Well, here is a quick script which will allow you to automate the clearing of the chassis intrusion status.

The ChassisIntrusionStatus property can be set to one of the following values:
  1. Other
  2. Unsupported
  3. Detected
  4. Not Deteched
  5. Clear
Of these values, the only one which we are able to use is 5 (Clear). By specifying that the ChassisIntrusionStatus property should be set to a value of 5 (Clear) will cause the Dell OMCI to reset this property to 4 (Not Detected) which will reset or clear the chassis intrusion alert.

Code:
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''
'
' File: DellResetChassisIntrusion.vbs
' Updated: Feb 22, 2006
' Version: 1.0
' Author: Dan Thomson, myITforum.com columnist
' I can be contacted at dethomson@hotmail.com
'
' Purpose: To clear the chassis intrusion alert on a Dell OMCI client.
'
' Usage: cscript.exe DellResetChassisIntrusion.vbs <systemname>
'
' Input: systemname = Name of system to reset
'
' Requirements:
' - Dell Open Manage Client (see below for tested version)
' - Windows Script http://msdn.microsoft.com/library/default.asp?url=/downloads/list/webdev.asp
' - WMI version 1.5
'
' Notes:
' Tests performed using:
' Windows XP Professional SP2
' Windows Script v5.6
' Dell Open Manage Client version 6.1.1.259 or greater
' Precision 530MT ( success )
' Optiplex GX260 & GX280 ( success )
'
'''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''''

Option Explicit
On Error Resume Next

'*** Declare variables
Dim strNameSpace
Dim strComputerName
Dim strClassName
Dim strKeyValue
Dim objInstance
Dim strPropName
Dim strPropValue

'*** Check that the right executable was used to run the script
'*** and that all parameters were passed
If (LCase(Right(WScript.FullName, 11)) = "wscript.exe" ) Or _
(Wscript.Arguments.Count < 1) Then
Call Usage()
WScript.Quit(-1)
End If

'*** Initialize variables
strNameSpace = "root/Dellomci"
strComputerName = WScript.Arguments(0)
strClassName = "Dell_SMBIOSSettings"
strKeyValue = "0"
strPropName = "ChassisIntrusionStatus"

'*** Retrieve the instance of Dell_SMBIOSSettings class
Set objInstance = GetObject("WinMgmts:{impersonationLevel=impersonate}//" & _
strComputerName & "/" & strNameSpace & ":" & strClassName & "=" & _
Chr(34) & strKeyValue & Chr(34))

strPropValue = objInstance.Properties_.Item(strPropName).Value

'*** Clear the value of ChassisIntrusionStatus only if it = 3
' A value of 3 = "Detected"
' Setting this value to 5 (Clear) will cause the ChassisIntrusionStatus
' property to really be reset to 4 (Not Detected).

If strPropValue = 3 then

'*** Set the new value for the property and save the instance
objInstance.Properties_.Item(strPropName).Value = 5
objInstance.Put_

'*** If any errors occurred, let the user know
If Err.Number <> 0 Then
WScript.Echo "Clearing the chassis intrusion alert failed."
End If
End If

Set objInstance = Nothing

WScript.Quit(Err.Number)

'*** Sub used to display the correct usage of the script
Sub Usage()
Dim strMessage
strMessage = "incorrect syntax. You should run: " & vbCRLF & _
"cscript.exe //nologo DellResetChassisIntrusion.vbs <systemname>"
WScript.Echo strMessage
End Sub

End Code

The code can be downloaded here -> 11134DellResetChassisIntrusion.zip.

The information regarding the available OMCI WMI property values was retrieved via the CIM Browser which is found in Microsoft's WMI Tools.

If there are any suggestions or questions about this article, please post them in the Article Discussions Forum. Also, check out the Dell Forum to find assistance with Dell systems.

I can also be reached at dethomson@hotmail.com. But, if possible, please post any questions to one of the myITforum forums so that others can benefit from our discussions.

I hope this information has proved useful.

Happy scripting `:)

Dan

See my other articles

  myITforum.com ©2010 | Legal | Privacy