Category: Hyper-V
-

Correctly Setting the PowerShell Root
⭐ You should NOT set $root or $PSScriptRoot in your profile Your profile runs in contexts where: If you set a $root variable in your profile, you would be lying to your scripts about where they live. ❌ Example of what goes wrong If your profile sets: Then you run a script from: Your script…
-

Scheduled Local Admin
You could also change the duration to hours with (Get-Date).AddHours($durationInHours)

