As a way to kick off migration from Reddit to Lemmy, let’s start with a classic thread. So, what have you done with PowerShell this month?

For bonus imaginary points, have you done anything in regards to the Great Reddit Migration?

  • @MIDItheKID
    link
    English
    11 year ago

    Made a Powershell script/app/gui for our T2 team to use to reset local admin passwords on apple/Jamf devices.

    Packaged up an in-place win10 to win11 upgrade with PSADT that uses deferrals, user interaction, and deadlines. It started simple, but it has turned into a behemoth of a script that does things like check for last reboot time, and if the device hasn’t rebooted in the last 48 hours, swap the PSADT XML on the fly to show a different reboot message and make a scheduled task to kick off the install after a reboot (which actually required the task calling a script that did a start-sleep for about 2 minutes before calling the actual installation script because it needed to wait for certain other tasks to complete or it would just fail). It also keeps track of failures and gives up after 5 attempts so the user isn’t hit with post-install reboots every day. It also flips back and fourth between using setup.exe from the image and Windows11InstallationAssistant.exe between each failure because some machines respond better to different installation types. It also does a cleanup with cleanmgr before kicking off because that was a problem for some devices. It’s been a Rollercoaster. Once I have it all sorted out I am going to have to post it somewhere so that other people don’t have to go through the same trouble that I did.

    Oh also like writing scripts to compare CSV files to find matches and stuff… You know. The usual.