#powershell-mac — Public Fediverse posts
Live and recent posts from across the Fediverse tagged #powershell-mac, aggregated by home.social.
-
Script To Download the Current Version of PowerShell
One of the annoying things about well, any software is checking to see if you have the currrent version. This is a thing with PowerShell, and because the PowerShell team in its finite wisdom has decided to not just have a "latest stable/lts/preview" url, we have to figure this out manually. It's not too bad though, fortunately, the PowerShell team gives us…
https://bynkiidotcom.wordpress.com/2025/11/11/script-to-download-the-current-version-of-powershell/
-
Script To Download the Current Version of PowerShell
One of the annoying things about well, any software is checking to see if you have the currrent version. This is a thing with PowerShell, and because the PowerShell team in its finite wisdom has decided to not just have a "latest stable/lts/preview" url, we have to figure this out manually. It's not too bad though, fortunately, the PowerShell team gives us…
https://bynkiidotcom.wordpress.com/2025/11/11/script-to-download-the-current-version-of-powershell/
-
PowerShell script signer is done!
Well, it's a 1.0.1, there’s a few things I want to add, but it's not bad at the moment. It's on the PowerShell Gallery at: https://www.powershellgallery.com/packages/Set-PowerShellScriptSig/1.0.1 and the github link is at: https://github.com/johncwelch/pwshsigner
the readme on the github repo has the small number of future improvements I have planned, but for now, it's a solid MVP.
-
PowerShell script signer is done!
Well, it's a 1.0.1, there’s a few things I want to add, but it's not bad at the moment. It's on the PowerShell Gallery at: https://www.powershellgallery.com/packages/Set-PowerShellScriptSig/1.0.1 and the github link is at: https://github.com/johncwelch/pwshsigner
the readme on the github repo has the small number of future improvements I have planned, but for now, it's a solid MVP.
-
Minor update to Get-MacInfo, added iBridge data from system_profiler. Install from https://www.powershellgallery.com/packages/Get-MacInfo, source at https://github.com/johncwelch/Get-MacInfo
#powershell
#powershellMac
#powershellmacOShttps://bynkiidotcom.wordpress.com/2025/03/13/get-macinfo-update-2/
-
Minor update to Get-MacInfo, added iBridge data from system_profiler. Install from https://www.powershellgallery.com/packages/Get-MacInfo, source at https://github.com/johncwelch/Get-MacInfo
#powershell
#powershellMac
#powershellmacOShttps://bynkiidotcom.wordpress.com/2025/03/13/get-macinfo-update-2/
-
My new PowerShell module, GetChooseFileName is now up on the PowerShell Gallery:
https://www.powershellgallery.com/packages/Get-ChooseFileName
-
My new PowerShell module, GetChooseFileName is now up on the PowerShell Gallery:
https://www.powershellgallery.com/packages/Get-ChooseFileName
-
Get-ChooseFileName is basically done, getting approval before releasing up to the PowerShell gallery: https://github.com/johncwelch/Get-PSChooseFileName
-
Get-ChooseFileName is basically done, getting approval before releasing up to the PowerShell gallery: https://github.com/johncwelch/Get-PSChooseFileName
-
working on my next PS module: https://github.com/johncwelch/Get-PSChooseFileName
-
working on my next PS module: https://github.com/johncwelch/Get-PSChooseFileName
-
Getting Warranty Info on your Mac with PowerShell
This was a feature someone asked for with Get-MacInfo. Here's the basics, the script is on the github site, and VERY REAL WARNINGS:
This is incredibly fragile, as it relies on a directory, com.apple.NewDeviceOutreach, being in ~/Library/Application Support/ for the user running the script. I'm not even going to try to play "peekaboo in other user homedirs" with a…
https://bynkiidotcom.wordpress.com/2025/02/04/getting-warranty-info-on-your-mac-with-powershell/
-
Getting Warranty Info on your Mac with PowerShell
This was a feature someone asked for with Get-MacInfo. Here's the basics, the script is on the github site, and VERY REAL WARNINGS:
This is incredibly fragile, as it relies on a directory, com.apple.NewDeviceOutreach, being in ~/Library/Application Support/ for the user running the script. I'm not even going to try to play "peekaboo in other user homedirs" with a…
https://bynkiidotcom.wordpress.com/2025/02/04/getting-warranty-info-on-your-mac-with-powershell/
-
One advantage of moving to JSON for system_profiler output as opposed to line numbers is that I can get rid of a LOT of duplication.
Directly addressing elements doesn’t suck.
-
One advantage of moving to JSON for system_profiler output as opposed to line numbers is that I can get rid of a LOT of duplication.
Directly addressing elements doesn’t suck.
-
Script I used to work out grabbing json system_profiler data. Tpowershellmacos complicated because there’s things that aren’t always there, and a LOT of info if they’re all there.
https://github.com/johncwelch/Get-MacInfo/blob/master/system_profiler%20json%20info.ps1
-
Script I used to work out grabbing json system_profiler data. Tpowershellmacos complicated because there’s things that aren’t always there, and a LOT of info if they’re all there.
https://github.com/johncwelch/Get-MacInfo/blob/master/system_profiler%20json%20info.ps1
-
this will be very nice for the updates I want to do for Get-MacInfo.
Now if anyone with a desktop mac, intel or applesilcon feels like sending me the output from system_profiler SPPowerDataType -json?
I don't actually have one, so I'm unsure of what it actually looks like
-
this will be very nice for the updates I want to do for Get-MacInfo.
Now if anyone with a desktop mac, intel or applesilcon feels like sending me the output from system_profiler SPPowerDataType -json?
I don't actually have one, so I'm unsure of what it actually looks like
-
OMFG, figured out how to get structured data from system_profiler I can use in PowerShell!
powershell use the -json option for the SP data type you want info on, because the XML is a gods-damned mess. JSON is WAY easier.
three steps:
1) Get output of the system-profiler command with -json. Creates array of strings
2) Convert Array to string with out-string
3) Feed string to ConvertFrom-Json as -InputObjectfrom there, it acts like an array of objects. Very nice!
#PowershellMac
#powershell -
OMFG, figured out how to get structured data from system_profiler I can use in PowerShell!
powershell use the -json option for the SP data type you want info on, because the XML is a gods-damned mess. JSON is WAY easier.
three steps:
1) Get output of the system-profiler command with -json. Creates array of strings
2) Convert Array to string with out-string
3) Feed string to ConvertFrom-Json as -InputObjectfrom there, it acts like an array of objects. Very nice!
#PowershellMac
#powershell -
So stupid PowerShell trick that ironically doesn’t work in PowerShell 5.1 windows, but does work well in 7.x: you can use test-connection to explicitly test for TCP port connectivity on IPv6:
Test-Connection <servername> -IPv6 -TcpPort <port number>
For IPv4, use -IPv4 instead. It’s nice when you’re troubleshooting IPv6 issues.
-
So stupid PowerShell trick that ironically doesn’t work in PowerShell 5.1 windows, but does work well in 7.x: you can use test-connection to explicitly test for TCP port connectivity on IPv6:
Test-Connection <servername> -IPv6 -TcpPort <port number>
For IPv4, use -IPv4 instead. It’s nice when you’re troubleshooting IPv6 issues.
-
Another update to https://bynkiidotcom.wordpress.com/2023/07/20/signing-powershell-scripts-on-macos/ with many thanks to @jborean for creating a module that does exactly what I needed!
powershell #PowershellMac #macadminss
-
Another update to https://bynkiidotcom.wordpress.com/2023/07/20/signing-powershell-scripts-on-macos/ with many thanks to @jborean for creating a module that does exactly what I needed!
powershell #PowershellMac #macadminss
-
Figured out how to sign PowerShell scripts the authenticode way on macOS, updated post here:
https://bynkiidotcom.wordpress.com/2023/07/20/signing-powershell-scripts-on-macos/
So yeah, you can do that correctly. Pretty nice
-
Figured out how to sign PowerShell scripts the authenticode way on macOS, updated post here:
https://bynkiidotcom.wordpress.com/2023/07/20/signing-powershell-scripts-on-macos/
So yeah, you can do that correctly. Pretty nice