Create a function with optional call variables

Powershell provides a lot of built-in support for common parameter scenarios, including mandatory parameters, optional parameters, “switch” (aka flag) parameters, and “parameter sets.” By default, all parameters are optional. The most basic approach is to simply check each one for $null, then implement whatever logic you want from there. This is basically what you have already … Read more

Can’t start hostednetwork

This happen after you disable via Control Panel -> network adapters -> right click button on the virtual connection -> disable To fix that go to Device Manager (Windows-key +x+ m on windows 8, Windows-key +x then m on windows 10), then open the network adapters tree , right click button on Microsoft Hosted Network Virtual Adapter and click on enable. Try now with … Read more

Access is denied on mklink

I jumped through all the hoops: Create a non-admin account (in my case, activated the guest account). As Admin, run secpol.msc and grant this account Create Symbolic Link permissions. runas /user:guest cmd to open a command window as the guest.only to get caught on the simplest problem: because I was running as guest, I didn’t have write permissions within the directory. So, As admin, … Read more

How Should I Set Default Python Version In Windows?

This is if you have both the versions installed. Go to This PC -> Right-click -> Click on Properties -> Advanced System Settings. You will see the System Properties. From here navigate to the “Advanced” Tab -> Click on Environment Variables. You will see a top half for the user variables and the bottom half for System variables. Check the System Variables and double-click on … Read more