Coder Social home page Coder Social logo

Comments (8)

franklesniak avatar franklesniak commented on September 23, 2024

Posting for future reference - there is an interesting difference between the WMI cmdlets (which behave more like VBScript), and the Get-CimInstance cmdlets.
image

from sysadmin-accelerator.

franklesniak avatar franklesniak commented on September 23, 2024

More legacy PowerShell stuff for future reference:
image

from sysadmin-accelerator.

franklesniak avatar franklesniak commented on September 23, 2024

Might be useful to convert WMI UTC string date format to native VBScript: https://www.informit.com/articles/article.aspx?p=23751&seqNum=3

This Microsoft doc is good for converting CIM_DATE format to VT_DATE (native VBScript date/time format)
https://docs.microsoft.com/en-us/windows/win32/wmisdk/swbemdatetime#examples

However, the note on this SE post indicates that the WbemScripting.SWbemDateTime object is not available on older operating systems:
https://stackoverflow.com/a/29537092/2134110
and I confirmed this in the MSDN 2003 library --- SWbemDateTime was first available in Windows XP and Windows Server 2003. So older OSes won't have it and will instead need to be parsed as mentioned in the informit.com article linked above.

from sysadmin-accelerator.

franklesniak avatar franklesniak commented on September 23, 2024

The yyyyMMddHHmmss format comes from the Distributed Management Task Force (DMTF)'s Common Information Model (CIM) specification. See: https://docs.microsoft.com/en-us/windows/win32/wmisdk/date-and-time-format

WMI puts strings in this format to comply with the standard.

However, SMBIOS uses a different standard, also published by the DMTF. The SMBIOS standard says that the release date must be a string in the format "MM/DD/YYYY" or "MM/DD/YY" for a BIOS released 1999 or prior. Source: https://www.dmtf.org/sites/default/files/standards/documents/DSP0134_3.4.0.pdf

from sysadmin-accelerator.

franklesniak avatar franklesniak commented on September 23, 2024

How to get BIOS information on Linux:
https://stackoverflow.com/a/20604726/2134110

Also:
https://wiki.ubuntu.com/DellBIOS

Both sources confirmed that SMBIOSBIOSVersion/bios-version and ReleaseDate/bios-release-date are the most important data points. Manufacturer/bios-vendor is also useful.

from sysadmin-accelerator.

franklesniak avatar franklesniak commented on September 23, 2024

This post seems to suggest ISO 2601 format for string-based date output: https://stackoverflow.com/a/49562607/2134110

So maybe the move is to convert the DMTF date to ISO 2601 format for string output, and then DMTF to native VBScript/PowerShell datetime format

This SE post is pretty good reference for converting .NET datetime to ISO 2601. https://stackoverflow.com/questions/114983/given-a-datetime-object-how-do-i-get-an-iso-8601-date-in-string-format

from sysadmin-accelerator.

franklesniak avatar franklesniak commented on September 23, 2024

This is a useful function to determine whether a given date falls into DST:
https://www.robvanderwoude.com/files/isdst_vbs.txt
It requires Windows NT4 SP4 (or later), Windows 2000, or later

from sysadmin-accelerator.

franklesniak avatar franklesniak commented on September 23, 2024

Leaving open until PowerShell code is written

from sysadmin-accelerator.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.