Thanks for the reply balala.
The output has changed with the new PowerShell command and the RegEx no longer applies.
I posted the output in a new post.
It is currently September 8th, 2024, 12:11 am
Get BIOS Release Date and format
-
- Posts: 47
- Joined: August 22nd, 2021, 6:10 pm
-
- Developer
- Posts: 2725
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: [SOLVED] Get BIOS Release Date and format [SOLVED]
No need for a new thread for this since it is all related.
You can modify the original RunCommand measure (posted by ikarus1969) to format for a date. This would require no extra substitutions. Just let powershell do it all.Sh8dyDan wrote: ↑July 20th, 2024, 9:55 pm I'm afraid I'm going to have to ask for help from you guys with some RegEx.
I'm trying but struggling with RegEx. Is RegEx101.com an option and if so what settings would select to generate an output for Rainmeter
OUTPUT STRING:RESULT:Code: Select all
ReleaseDate ----------- 3/26/2024 8:00:00 PM
OUTPUT STRING:Code: Select all
2024/03/26
RESULT:Code: Select all
Caption ------- Microsoft Windows 11 Pro
Code: Select all
Microsoft Windows 11 Pro
Here is an example:
Code: Select all
[MeasureBIOS_Date]
Measure=Plugin
Plugin=RunCommand
Parameter=powershell.exe -NoProfile Get-Date (Get-CimInstance -ClassName Win32_BIOS).ReleaseDate -Format "yyyy/dd/MM"
State=Hide
OutputType=ANSI
[MeasureOS_Caption]
Measure=Plugin
Plugin=RunCommand
Parameter=powershell.exe -NoProfile (Get-WmiObject -Class Win32_OperatingSystem).Caption
State=Hide
OutputType=ANSI
PS - I added the "powershell.exe" into the Parameter option to make it shorter. "-NoProfile" is there in case you (or others) print some custom stuff when loading powershell with your user profile.
-
- Posts: 47
- Joined: August 22nd, 2021, 6:10 pm
Re: Get BIOS Release Date and format
Thank you Brian for the reply.
I appreciated the PowerShell code example. It illustrated to me the ability to drill into and just extract the needed info with no need for complicated substitutions.
Quick question about wmic deprecation. Does it also include WmiObject.
Not really a concern because I went ahead and converted all my commands away from wmi and WmiObject.
Thank you
I appreciated the PowerShell code example. It illustrated to me the ability to drill into and just extract the needed info with no need for complicated substitutions.
Quick question about wmic deprecation. Does it also include WmiObject.
Not really a concern because I went ahead and converted all my commands away from wmi and WmiObject.
Thank you
-
- Developer
- Posts: 2725
- Joined: November 24th, 2011, 1:42 am
- Location: Utah
Re: Get BIOS Release Date and format
I don't think so. The entry says:
So, I believe it only effects the wmic command (usually located here: C:\Windows\System32\wbem\WMIC.exe), not the powershell version.Microsoft wrote: The WMIC utility is deprecated in Windows 10, version 21H1 and the 21H1 General Availability Channel release of Windows Server. This utility is superseded by Windows PowerShell for WMI. Note: This deprecation applies to only the command-line management utility. WMI itself isn't affected.
[Update - January 2024]: Currently, WMIC is a Feature on Demand (FoD) that's preinstalled by default in Windows 11, versions 23H2 and 22H2. In the next release of Windows, the WMIC FoD will be disabled by default.
-Brian