Archive for the ‘PowerShell’ Category
Posted by jpluimers on 2026/06/10
[Wayback/Archive] This is useful for playing back in Cartrain CP7##BMW devices (currently CP700BMW, CP730BMW, CP740BMW) as these play back in the order in which directories and files have been created. which is related to Elektronik-Idee – CP740BMW – USB wireless MP3 Player (with Bluetooth and Audio/Video in support) and fully PowerShell 2.0 compatible:
Script to recursively copy directories in alphabetical order from source-base-directory to destination-base-directory
while adding an intermediate directory with a single uppercase letter in destination-base-directory for
each set of directories under source-base-directory starting with that letter.
This is useful for playing back in Cartrain CP7##BMW devices (currently CP700BMW, CP730BMW, CP740BMW)
as these play back in the order in which directories and files have been created, as per:
- https://www.cartain.de/downloads/cp740bmw/CP740BMW-OM.pdf
Unterordner sind hervorragend geeignet um Musik besser zu organisieren. Dateinamen und Unterverzeichnis sind in der Reihenfolge gleichgestellt. Die Wiedergabe der Titel in sämtlichen Unterordnern erfolgt der Reihe nach wie sie auf den USB Stick kopiert wurde
- https://www.cartain.de/downloads/cp740bmw/CP740BMW-OM-EN.pdf
Sub folders are a good possibility to organize your music collection. The order of playback is the same order you copied the files onto the card.
- https://www.cartain.de/downloads/cp730bmw/CP730BMW-OM.pdf
- https://www.cartain.de/downloads/cp730bmw/CP730BMW-OM-EN.pdf
–jeroen
Read the rest of this entry »
Posted in .NET, CommandLine, Development, PowerShell, PowerShell, Scripting, Software Development, Windows Development | Leave a Comment »
Posted by jpluimers on 2026/05/13
The Scoop repository lists this first time Scoop install command at [Wayback/Archive] ScoopInstaller/Scoop: A command-line installer for Windows. – installation:
Run the following command from a non-admin PowerShell to install scoop to its default location C:Users<YOUR USERNAME>scoop.
iwr -useb get.scoop.sh | iex
[Wayback/Archive] ScoopInstaller/Install: 📥 Next-generation Scoop (un)installer is very similar:
Run this command from a non-admin PowerShell to install scoop with default configuration, scoop will be install to C:Users<YOUR USERNAME>scoop.
irm get.scoop.sh | iex
# You can use proxies if you have network trouble in accessing GitHub, e.g.
irm get.scoop.sh -Proxy 'http://<ip:port>' | iex
The Scoop homepage at [Wayback/Archive] Scoop.sh is not much better:
Read the rest of this entry »
Posted in Batch-Files, CommandLine, Development, Power User, PowerShell, PowerShell, Scoop, Scripting, Software Development, Windows | Leave a Comment »
Posted by jpluimers on 2026/02/25
This worked on the built-in Windows PowerShell to get the recommendation status:
$volume = Get-WmiObject -Class Win32_Volume -Filter "DriveLetter = 'C:'"
$analysis = $volume.DefragAnalysis()
$analysis.DefragAnalysis
$analysis.DefragRecommended
Without elevation token, $analysis.DefragAnalysis will be empty and $analysis.DefragRecommended will return False, but elevated it will return the analysis data and $analysis.DefragRecommended will return False or True depending on the analysis result.,
And this gets the most recent defragmentation action from the event-log:
Read the rest of this entry »
Posted in CommandLine, Development, PowerShell, Scripting, Software Development | Tagged: possible | 2 Comments »
Posted by jpluimers on 2025/12/03
This post from 2023 [Wayback/Archive] Launch Settings Pages using ms-settings URL shortcuts » Winhelponline
This list will tremendously help me quickly navigating directly to Windows settings pages.
In case the list is not complete, there are others lists – like [Wayback/Archive] Windows 11 ms-settings Commands (Settings URI Shortcuts) – which I found via the second query.
Maybe one day, I will merge the results of a few of those results. If so, a new blog post will follow.
Got the first via a late edit of my blog post gsudo (sudo for windows).
Queries:
--jeroen
Posted in CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 10, Windows 11 | Leave a Comment »
Posted by jpluimers on 2025/09/16
Not all virtualised hardware (older hardware usually has died by now) conforms to the Windows 11 minimum specifications.
So here are some links that should be of help to still get Windows 11 running on those:
If you insist on running older hardware that has a TPM header on the mainboard:
Read the rest of this entry »
Posted in CommandLine, Development, MSI, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 11, Z77A-G43 | Leave a Comment »
Posted by jpluimers on 2025/09/03
I needed the portable version of [Wayback/Archive] CrystalDiskMark on Chocolatey (unlike the [Wayback/Archive] Chocolatey Software | CrystalDiskMark (Install) package). Luckily I found the auto-update package [Wayback/Archive] Chocolatey Software | CrystalDiskInfo (Portable) and knew both that CrystalDiskMark is from the same author as CrystalDiskInfo, and that their code is on GitHub like the Chocolatey package.
Given I had a the below chocolatey-packages/automatic/crystaldiskinfo.portable as a template, I asked the CrystalDiskInfo (Portable) package maintainer if they were willing to maintain CrystalDiskMark (portable) as well and was glad the response was “yes”: [Wayback/Archive] Portabe CrystalDiskMark similar to the current CrystalDiskInfo? · Issue #159 · mkevenaar/chocolatey-packages
So for my link-archive:
Read the rest of this entry »
Posted in .NET, Chocolatey, CommandLine, Development, Lightweight markup language, MarkDown, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows | Tagged: 159, 16 | Leave a Comment »
Posted by jpluimers on 2025/09/02
For a long time, I have ran with the runelevated.bat in [Wayback/Archive] Run an Elevated command using that: “net file” returns errorlevel 1 when not UAC, and “PowerShell Start-Process” has a “-Verb RunAs“; see the answers at http://stackoverflow.com/questions/7044985/how-can-i-auto-elevate-my-batch-file-so-that-it-requests-from-uac-admin-rights for more information
By now, I would just prepend this oneliner into each batch-file needing elevation:
@pushd "%~dp0" & fltmc | find "." && (powershell start '"%~f0"' ' %*' -verb runas 2>nul && popd && exit /b)
Both the initial batch file and one-liner are from [Wayback/Archive] windows – How can I auto-elevate my batch file, so that it requests from UAC administrator rights if required? – Stack Overflow (thanks [Wayback/Archive] Ir Relevant, [Wayback/Archive] ceztko, [Wayback/Archive] Jamesfo, and [Wayback/Archive] PDixon724)
Note that the net file trick below should actually be repeated twice. This is explained in [Wayback/Archive] windows – Batch script: how to check for admin rights – Stack Overflow (thanks [Wayback/Archive] zumalifeguard), but wait: there is even a better solution!
The fltmc trick above works much better than the net file trick and is available from Windows XP and up, see [Wayback/Archive] windows – Batch script: how to check for admin rights – Stack Overflow (thanks [Wayback/Archive] npocmaka).
Oh: on systems where I have full installation control, I always install gsudo, see gsudo (sudo for windows).
–jeroen
Read the rest of this entry »
Posted in .NET, Batch-Files, CommandLine, Development, PowerShell, PowerShell, Scripting, Software Development | Leave a Comment »
Posted by jpluimers on 2025/08/12
Posted in .NET, Batch-Files, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 10, Windows 11, Windows 8.1 | Leave a Comment »
Posted by jpluimers on 2025/08/01
A few notes after I helped updating [Wayback/Archive] Chocolatey Software | SetACL (Portable) 3.0.6.0 to version 3.1.2.0 and [Wayback/Archive] Updates glab from 1.22.0 to 1.24.1; fixes #2 by jpluimers · Pull Request #3 · corbob/ChocoPackages.
As the burden on maintainers (not just Chocolatey ones) is high, not all packages get updated soon after new underlying software versions arrive.
Which means the maintainers are often very happy when an occasional user helps and preferably sends in a pull request.
That brings me to the an important point IN DOCUMENTATION DO NOT LIMIT EXAMPELS TO ONLY ABBREVIATED PARAMETERS OR VERBS as that scares away occasional and novice users of your software.
Chocolatey documentation is no exception on this, hence this blog post meant for people other than maintaining chocolatey packages on a day to day base.
Read the rest of this entry »
Posted in CertUtil, Chocolatey, CommandLine, Conference Topics, Conferences, Development, Event, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows | Tagged: 2, 2850, 3, 309, 561 | Leave a Comment »
Posted by jpluimers on 2025/07/29
Posted in .NET, Batch-Files, CommandLine, Development, Power User, PowerShell, PowerShell, Scripting, Software Development, Windows, Windows 10, Windows 11 | Leave a Comment »