Comments (8)
Posting for future reference - there is an interesting difference between the WMI cmdlets (which behave more like VBScript), and the Get-CimInstance cmdlets.
from sysadmin-accelerator.
More legacy PowerShell stuff for future reference:
from sysadmin-accelerator.
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.
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.
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.
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.
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.
Leaving open until PowerShell code is written
from sysadmin-accelerator.
Related Issues (7)
- GetTPMInfo() and GetTPMInfoSimpleBoolean() indicate enabled/activated/ready status unknown when no TPM present
- Create a function that generates a GUID
- Create a function that gets the local appdata folder
- Add a function that determines if profiles are enabled on Windows 9x
- Create a function that gets the user's profile path
- Add a function that converts a string into .NET-compatible, escaped RegEx
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from sysadmin-accelerator.