Unsolved
This post is more than 5 years old
17 Posts
0
22805
OMCI and Powershell
Tried posting this elsewhere and didn't get anywhere - hopefully this location is more appropriate.
I'm attempting to script making some changes on some optiplex desktops. I would like to use powershell, but the sample scripts page does not have consistent info with powershell vs vbscript. I would like to enter an internal asset number, which I think I figured out by doing : (gwmi DCIM_Chassis -namespace root\dcim\sysman).ChangeAssetTag($invNum). But I would also like to do a few other things such as: Set the password for the system, and prevent booting from removable devices. I would appreciate some assistance on that.
Thanks
hipsterdoofus
17 Posts
0
October 24th, 2012 09:00
Still looking for help on this, but I was able to set the password via powershell like this:
$a = (gwmi -namespace root\dcim\sysman DCIM_BIOSService)
$a.SetBIOSAttributes($null,$null,"AdminPwd", , ,$null)
Dell - Sharmad
52 Posts
0
October 30th, 2012 04:00
In OMCI inorder to disable a device, you have to list all the devices in the method ChangeBootOrder of the class DCIM_BootConfigSetting expect the ones which are expected to be disabled.
You could do this in multiple ways but the overview for the same is as follows:
1. The following command will be used to get the device Ids of the system which is not equal to USB
$a = (gwmi -namespace root\dcim\sysman DCIM_BootSourceSetting |
where {$_.BIOSBootString -ne "USB Storage Device"} | select InstanceID
This will give you the instanceID os all devices except the USB Boot Device
2. Prefix the following string to the obtained string
"// /root/dcim/sysman:DCIM_BootSourceSetting.InstanceID="
you can do this using the following
$c = foreach ($b in $a)
{"// /root/dcim/sysman:DCIM_BootSourceSetting.InstanceID=" + $b}
3. Next you can give this as an input to the DCIM_BootConfigSetting class
$d = (gwmi -namespace root\dcim\sysman DCIM_BootConfigSetting)
$d.ChangeBootOrder($c,"AdminPwd",$null)
I hope this helps.