If you are scheduling tasks, no doubt you run across the issue that if you need a task run as a different user, said user needs the right to logon as a batch job. Doing this is fairly easy:

  1. Start secpol.msc
  2. Expand Local Policies -> User Right Assignment
  3. Find “Logon as a batch job”
  4. Add the user / service account as needed

This can of course also be set up via GPO.

I am starting to work more with VS Code, especially since it is so easy now to write PowerShell code on my MacBook Pro, without having to switch to a Windows VM or remote into a Windows machine.

Yet there a few kinks, they are however easy to fix.

  1. Install Powershell on the macOS
    So easy! Go to: https://github.com/PowerShell/PowerShell/releases/
    Download the latest PowerShell package for macOS
    (It’s the one ending with .pkg)
    Allow the package to be run:
    System Preferences -> Security & Privacy -> Allow Apps downloaded from
    Follow the prompt
    Done.
  2. Installing the Powershell Extension
    Press ‘Shift+CMD+P’ to open the Command Palett
    Type ‘Install Extensions’, select it and press enter
    Type in PowerShell, there is currently only a single extension from Microsoft for PowerShell, so that’s the one you should pick.
    Click on Install/Enable, restart VS Code, done.
  3. PowerShell Intellisense issues
    It seems to be common issue if there is no OpenSSL installed
    Have a read here how to fix it.
  4. Another issue is PowerShell remoting. Since Windows is using win RM, macOS or Linux know nothing about that. You have to use SSH, specifically OpenSSH. You have to install that on your windows machine which is right now a little bit tricky (step by step here) but eventually they are going to build a cmdlet or something to automate that for you.

Yay bash! Still have not found a good powershell replacement for grep… sure there is ‘select-string’ but meh…

Anyways how to install bash on Windows 10:

  1. Make sure you have the right version of Windows 10 and the Anniversary Update installed!
  2. Start -> Settings -> Update & Security -> For Developers -> Activate Developer Mode
  3. Go with Programs and Features (appwiz.cpl) and click on ‘Turn Windows features on or off’
  4. You should now see “Windows Subsystem for Linux (Beta)
  5. Install it and run bash
  6. Now the most frustrating part, you have to sign in to the windows store and accept the TOS
  7. Once finished you should have “Bash on Ubuntu on Windows”

As this is a very common ‘issue’ I am just going to post the quick-fix:

If you have internet:

Install from install media: