PXE enablen op een slimme manier?

Pagina: 1
Acties:

  • -Nexus
  • Registratie: Februari 2002
  • Laatst online: 11-06 21:14

-Nexus

|1.25GHz G4 Powerbook|

Topicstarter
Ik ben bezig met ZEN voor mijn stage,
Ik schrijf enkel de procedure, gelukkig maar want er zijn 3000 clients waar het op moet komen.
De 3000 pc's zijn Dell computers varierend van optiplex 110 t'm 280
helaas vereist ZEN preboot services (PXE) om te kunnen imagen, en die instelling moet dus op iedere pc in de bios, bij integrated periphels aangezet worden, is hier een snelle manier voor?
zal er bij iedere pc langsgelopen moeten worden?
ik weet dat dell bios flashen over het netwerk ondersteund, maar ik verwacht dat je daar PXE voor nodig hebt.
Ik hoop dat jullie tweakers er iets van weten, :)

  • Krypt
  • Registratie: April 2000
  • Laatst online: 01-09 10:35
Wat draait er nu op die systemen?? Kun je remote niet Dell Openmanage installeren, daarmee kun je volgens mij ook PXE aanzetten..

Pvouput live


  • -Nexus
  • Registratie: Februari 2002
  • Laatst online: 11-06 21:14

-Nexus

|1.25GHz G4 Powerbook|

Topicstarter
Dank voor de snelle reply!
ik zocht blijkbaar op de verkeerde termen...

verder ook een vbscript die t zou moeten kunnen, maar ik ga voor de openmanage client...
code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
==========================================================================
'
' 
'
' NAME: EnablePXE.vbs
'
' AUTHOR: Droid256

' DATE  : 2/20/2003
'
' COMMENT: Can be used to set any BIOS setting.  Basic
' Progression of the script:
'
' Verify OMCI 6.1 or 7.0 is installed
'
' Check to see if the BIOS password is enabled, and the validate the password
' with the credentials supplied by the strBIOSPassword variable if needed
'
' Executes the BIOS setting.  This script can easily be used as a 
' template to change any BIOS setting, not just PXE.  The values that must
' change for alternate BIOS settings are strBIOSSettableProperty, And
' intBiosSettingValue.
'
' The script will exit on any errors and log the failure in the 
' appplication event log and a log file in the root directory.
'
' The script will log success in the appplication event log and a 
' log file in the root directory
'
'==========================================================================

 Option Explicit

 '*** Declare variables
 Const EVENT_SUCCESS = 0
 Const EVENT_FAILURE = 1
 Const EVENT_WARNING = 2

 Dim strNameSpace
 Dim strComputerName
 Dim strBIOSPassword
 Dim StrErrorDirectory
 Dim StrErrorFileName
 Dim strBIOSSettableProperty
 Dim intBiosSettingValue
 
 on error resume Next

 strNameSpace = "root/Dellomci"  'Do not change
 
 StrErrorDirectory="C:\"         'Directory the result file will be stored in
 StrErrorFileName="OMCI.log"  'Name of Result File
 strBIOSPassword="dell"   'BIOS Password
 
 
 strBIOSSettableProperty="BuiltinNIC"  'Setting in BIOS to Change
 intBiosSettingValue=3   ' New Value for BIOS setting. The following values are possible
       ' 1 other
       ' 2 Unsupported
       ' 3 Enabled with PXE

       ' 4 Disabled
       ' 5 Enabled
       
       
 
 strComputerName = "."   'Computer Name, can substitute a netbios name or
       'IP address to set the values remotely. "." specifies
       'the local computer

 'Check to Verify OMCI 6.1 or 7.0 is installed
 
 If NOT OMCIversion(strComputerName) Then
  Call Logevents(EVENT_FAILURE,  strBIOSSettableProperty & " Could not be Set. " _
  & "OMCI 6.1 or 7.0 is not installed on Target System",StrErrorDirectory,StrErrorFileName)
  WScript.Quit()
 End If

 'Validate BIOS password if enabled

 If Not validatepassword(strBIOSPassword) then
  Call Logevents(EVENT_FAILURE, "Unable to Validate BIOS Password" _
  ,StrErrorDirectory,StrErrorFileName)
  WScript.Quit()
 End if 
 
 
 
 'Set a field in BIOS to desired value
 
 If Not SetDellConfigurationValue (strBIOSSettableProperty, intBiosSettingValue) Then
  Call Logevents(EVENT_FAILURE, strBIOSSettableProperty & " could not be set due to" _
  & " Error Number " & Err.Number & " " & Err.Description, _
  StrErrorDirectory,StrErrorFileName)
  WScript.Quit()
 Else
  Call Logevents(EVENT_Success, strBIOSSettableProperty & " was set to " _
   & intBiosSettingValue, StrErrorDirectory,StrErrorFileName)
 End If


'******************************************************************************
'Function SetDellConfigurationValue
' Sets the Bios settings specified in the strBIOSSettableProperty and 
' intBiosSettingValue variables 
'******************************************************************************

 Function SetDellConfigurationValue(strBiosProperty, intBiosValue)
 
 On Error Resume Next
 
 Dim objWMIservice
 Dim ColDellSystemConfig
 Dim objDellSystemConfig
 
 'connect to namespace and retrieve either dell_configuration instance Or
 'dell_smbiossettings instance depending on strOMCIclass pparamater

 Set objWMIservice=GetObject("winmgmts:{impersonationLevel=impersonate}//" _
 & strComputerName & "/" & strNameSpace)

 Set ColDellSystemConfig=objWMIService.execquery ("Select * from Dell_SMBIOSsettings")
 
 For Each objDellSystemConfig In ColDellSystemConfig
   If objDellSystemConfig.Properties_.item(strBiosProperty).value <> intBiosValue then
   objDellSystemConfig.Properties_.Item(strBiosProperty).Value = intBiosValue
   objDellSystemConfig.Put_
  End If 
 Next

 'if errors return False otherwise return true  
 If Err.Number <> 0  Then 
  SetDellConfigurationValue=False
 else
  SetDellConfigurationValue=True
 End if
  
 End Function


'******************************************************************************
'Function ValidatePassword
'Automatically detects if a BIOS password is set and validates 
'the contents of variable strBIOSPassword against the BIOS if the
'BIOS password is enabled.   
'******************************************************************************

 Function ValidatePassword(strPassword)

 On Error Resume Next
 
 Dim objInstance

 'Retrieve instance of Dell_configuration
 Set objInstance = GetObject("WinMgmts:{impersonationLevel=impersonate}//" & _
  strComputerName & "/" & strNameSpace & ":Dell_Configuration='Configuration'")
 
 'The PasswordVerification property will only be 0 when the system password
 'is enabled and has not been valdated.  The If statement below
 'ensures the password is validated only if the system has a password set
 
 If objInstance.Properties_.Item("PasswordVerification")=0 then
  objInstance.Properties_.Item("Password").Value = strPassword
  objInstance.Put_
 End If
 
 'If errors occur during P/W validation log it and quit the script
 If Err.Number <> 0 Then
  ValidatePassword=False
  Call Logevents(EVENT_FAILURE, "BIOS was not Configured. " _
 & "Password verification failed due to " & Err.Number & " " & Err.Description, _
 StrErrorDirectory,StrErrorFileName)
 
 Else
  'Return True if no errors
  ValidatePassword=True
 End if

 End function


'******************************************************************************
'Function OMCIVersion
'Gets OMCI version and returns true if OMCI 6.1 or 7.0 is installed
'******************************************************************************
 Function OMCIversion(strComputer)
 On Error Resume Next
 
 Dim objVersionInstance
 Dim colObjVersion
 Dim objV
 
 'Retrieve instance of Dell_SystemManagementSoftware Class

 Set objVersionInstance = GetObject("WinMgmts:{impersonationLevel=impersonate}//" & _
  strComputer & "/root/dellomci")
 
 
 Set colObjVersion=objVersionInstance.ExecQuery ("Select * from Dell_SystemManagementSoftware")
 
 'if OMCI 6.1 or 7.0 is installed return true else return false
 For Each objV in colObjVersion
  If objV.version = "6.1" or objV.version = "7.0" Then
   OMCIversion=True
  Else 
   OMCIversion=False
  End If
 Next
 If Err.Number <> 0 Then OMCIversion=False
 End Function

'******************************************************************************
'Function Logevents
'Logs any errors in event viewer and writes a text file.  Even viewer messages
'will be in the application log from the wsh application
'******************************************************************************    
 Sub Logevents(intSeverity, strErrorMessage, strDirectory, strFileName)
 
 Dim objShell
 Dim fso
 Dim objtxtfile
 
 'write event log error message
 Set objShell = Wscript.CreateObject("Wscript.Shell")
 objShell.LogEvent intSeverity, strErrorMessage

 'Write text file using filename passed in arguments
 Set fso = CreateObject("Scripting.FileSystemObject")
   
    set objtxtfile=fso.createtextfile(strDirectory & strFileName)
    objtxtfile.write(strErrorMessage)
    objtxtfile.close
   
 End sub

Verwijderd

Ik vind dit meer iets voor Software Algemeen :) Zit toch meer in de softwarematige kant dan de verbindingstechnische ;)