A user asked about creating a report to display machine name, model, and BIOS versions, and was advised to use Edge scripting and SIP DATA tags to convert WMI objects to JSON. To make sure the data is current, they were also advised to overwrite the data each time, and to use their own index. Certifications were also recommended. The article at https://support.controlup.com/docs/edge-dx-scripting-guide#example-for-powershell was provided for reference. The user ultimately managed to create the desired report.
Read the entire ‘Utilizing Edge Scripting and SIP DATA Tags to Create Custom Reports’ thread below:
Is there any way in Edge to pull a report of installed BIOS versions of your devices?
Get-WmiObject -Class Win32_BIOS
Throw that in a script to run daily and put it into an index.
https://support.controlup.com/docs/edge-dx-scripting-guide#example-for-powershell
Use the SIP DATA tags.
so we can take the data that comes from a deployed script to feed into a custom report??
More specifically take the data from the script and feed a custom index.
Build a report from the data in the new index.
The sky is the limit with Edge and custom reports using scripts.
i’ll check out that article in case it answers this question but i know how to do the custom script but how do you make sure that data goes into the system for me to use in a custom report? or does that just happen
With those enabled anything in the SIP DATA tags is fed to the index.
oh bad ass! thanks man! thats huge
You would want to do the overwrite in your case.
any worry about this warning? and why would i want the overwrite out of curiosity
ahh i guess to keep the data current right
You shouldn’t need bios version historically.
Ohh, and for the warning, use your own index. Put something like Bios in the index name.
Awesome thanks man!
so how long after running the script manually on a machine will that data show up in the Data section so we can make a custom report?
Should be immediate. Is there a second page on the bottom right?
Almost instantly. Make sure you convert output to json
hmm no not seeing it. so this is what our data page and script look like. how would i make sure to do the json convert? in the script somewhere?
Your missing the SIP DATA tags.
https://support.controlup.com/docs/edge-dx-scripting-guide#example-for-powershell
ahhh gotcha. i’ll look that over more to see how i need to tweak the script. thanks guys!
i need to read that page more but would this be a bit closer?
“`[Console]::OutputEncoding = [System.Text.Encoding]::UTF8 # This line is added automatically to help with Unicode characters. Please add your code below
Write-Output(“### SIP DATA BEGINS ###”)
Get-WmiObject -Class Win32_BIOS | ConvertTo-Json
Write-Output(“### SIP DATA ENDS ###”)“`
i know i’m being lazy and actually have to read the article ๐ it DID add the bios index but the data is empty still so i must be missing something
the device events will tell you what is wrong
A data index is a flat table. The WMI object is rather complex. You’ll need to select the fields you’re interested in
yup it didnt like it ๐
ok thanks! i guess i have some reading to do ๐
> Get-WmiObject -Class Win32_BIOS | select SMBIOSBIOSVersion,Manufacturer,Name,SerialNumber,Version | ConvertTo-Json
for example
Ahh right that’s easier than I was thinking. Thanks for the help guys!
last question….. i assume i can create a custom report pulling data from other existing indexes (ie. model #) and then also this new bios one i’m creating into 1 big report? (to say pull a report of all devices so i have data for the machine name, model & bios version)
Coming soon. Currently we cannot do cross index reports.
no problem! maybe i can find a way to run the get-wmiobject to pull model in w/ bios info or something
The other option is API access to indexes. Each index includes which device (ID) wrote the record.
You could use that to gather data from multiple indexes. Though you’d have to write scripts to grab the data.
https://apidoc.sip.controlup.com/
ultimately what i am trying to do is pull a report that shows me the machine name, model and bios version so we can find how many are below a certain version. seems like i’m so close here
alright i think i got it w/ this:
“`Write-Output(“### SIP DATA BEGINS ###”)
$computer = Get-WmiObject -Class Win32_ComputerSystem | Select-Object Model
$bios = Get-WmiObject -Class Win32_BIOS | Select-Object SMBIOSBIOSVersion,SerialNumber
$result = [pscustomobject]@{
Model = $computer.Model
SMBIOSBIOSVersion = $bios.SMBIOSBIOSVersion
SerialNumber = $bios.SerialNumber
}
$result | ConvertTo-Json
Write-Output(“### SIP DATA ENDS ###”)“`
wow ya this works great! i have the data coming in and a custom report w/ machine name, last user, serial number manufacturer, model and bios version. thanks for the help!
Edge is a REALLY cool product when you start to think about the fact that anything you can script you can collect data and report on.
The little bit I showed my boss he was pretty impressed. Said oooh now I understand why you pushed for this
Sweet! ๐
Also dive into the triggers. There are plenty of “places” you can execute scripts. Things like network connect, session events, app installed, etc.
Oh ya I was looking at that! So far I set it to just once a day
Yep but you can really get outside the box. Things like update proxy settings on a network event. Uninstall an app on application install if its not approved, etc.
Oh that’s interesting…. The unapproved app example! So our intune laptops users aren’t admins but since found how to install chrome. That’d be a fun way to mess with them ๐
is it possible on the custom reports to make the device name clickable / hyperlink like it is in the canned reports?
for anyone interested i have it working great and the report includes the machine name, user, last boot, manufacturer, model, serial number and bios version
“`Write-Output(“### SIP DATA BEGINS ###”)
$os = Get-WmiObject -Class Win32_OperatingSystem | Select-Object LastBootUpTime
$bootTime = [System.Management.ManagementDateTimeConverter]::ToDateTime($os.LastBootUpTime)
$computer = Get-WmiObject -Class Win32_ComputerSystem | Select-Object Manufacturer,Model,Username
$bios = Get-WmiObject -Class Win32_BIOS | Select-Object SMBIOSBIOSVersion,SerialNumber
$result = [pscustomobject]@{
Model = $computer.Model
Manufacturer = $computer.Manufacturer
Name = $computer.Username
SMBIOSBIOSVersion = $bios.SMBIOSBIOSVersion
SerialNumber = $bios.SerialNumber
LastBoot = $bootTime.ToString(“MM/dd/yyyy HH:mm:ss”)
}
$result | ConvertTo-Json
Write-Output(“### SIP DATA ENDS ###”)“`
Thanks Andrew. I had a action that collects the date but yours is much more extensive.
you bet! i started w/ just bios version and machine name and kept thinking of additional things to add in!
Continue reading and comment on the thread ‘How to use ControlUp Edge DX to create a report of installed BIOS versions of your devices?’. Not a member? Join Here!
Categories: All Archives, ControlUp Edge DX, ControlUp Scripts & Triggers