Father, author, blogger, enthusiast of all things PowerShell and automation. http://linktr.ee/mdowst
Just looking at it from the point of view of making the script more portable and easier for someone else to run, there are a few things I would address.
The first is the Write-Host
commands all over the script. I would recommend converting those to Write-Verbose
. Here is a great explanation when to use Write-Host
vs other outputs.
There are also numerous Write-Output
commands in the script. Anything sent to the Write-Output
will be returned to the calling console. If you need to take additional actions based on the results of this script, this could cause issues. You can run into problems with the New-Item
commands in there too, as they will produce output. You might consider saving them to a variable or piping to Out-Null
.
Also, there is no need to call exit and set an exit code in the way you are. If you want to write and error but have the script continue you can use, Write-Error
. If you want the processing to terminate then use throw
. Doing it this way will allow PowerShell’s built-in error handling to take care of the exit codes. It will also give you greater flexibility with using Error Action Preferences and using try/catch statements.
Finally, you have a path hardcoded for the workingDir. I would suggest making this a parameter or using an environment variable as this will make it more portable. Also, when creating the log variable, you will want to use the Join-Path cmdlet instead of just joining strings.
ConvertTo-InteractiveHTML
function. Doug walks through generating HTML tables with sortable columns and customizing them using AI. Whether you’re managing large datasets or need a quick way to visualize your data, this tutorial will guide you through the process. Install the PSAI module and start making your data more dynamic.I remember before scrambling they just put blocks that prevented you from going to certain channels. I somehow figured out if you ran the cable box through the VCR first and put it on channel 2 while the TV was still on 3, it would shift all the channels down one. Cinemax was channel 14, which our box just would not go to. But it would go to 13, so doing my little trick teenage me got to watch a lot of skinamax.
It took me longer than I would have liked, but I did finally get the next video uploaded. I hope you enjoy it as well.
Nice write up, and a great primer for someone coming from the Linux/Bash world.
Thanks! I’d love to hear your thoughts once you’ve watched it.
Thanks! I’m glad to hear you are finding it useful.
Thanks! I’m glad to hear others are finding it useful.
If I understand correctly, the signatures generated by PuTTY aren’t perfectly random, so if someone got a hold of a bunch of keys from a server, they could figure out the pattern. It takes about 60 keys. This affects not just PuTTY, but also FileZilla, WinSCP, TortoiseGit, and TortoiseSVN.
In other words if you have NIST P-521 keys, or any others using 521-bit ECDSA, you should revoke them and generate new key pairs. After you update your software.
For some reason their API would not return anything for assembly. I was curious to see where it would rank too,
Apparently it due to an issue with Kotlin - https://github.com/code-golf/code-golf/issues/151#issuecomment-1126266250
Biggest things I’m seeing is CVE-2023-21709 for Exchange requires a PowerShell script to be run after patching. Also, CVE-2023-29328/29330 for Teams affect all devices (Windows, Mac, iOS, and Android).
The book I wrote. When I first talked with the publisher he asked, “what skills would you look for in someone who wants to do your job?” And that’s the premise I stuck with writing it.
I feel down a rabbit hole, a few years ago wonder the same thing about C#. Here is what I found.
No Azure DevOps automatically increments it every time you run the pipeline.