Change default shell for OpenSSH on Windows
If you are using OpenSSH on Windows the default shell used when connecting is cmd.exe. To update Windows to use something different you need to update the registry and restart the OpenSSH service.
If you are using OpenSSH on Windows the default shell used when connecting is cmd.exe. To update Windows to use something different you need to update the registry and restart the OpenSSH service.
To make using and blogging simpler I have made some scripts, templates and quickadd commands to make a new article for my blog and then be able to run a PowerShell script to publish it.
I wanted to be able to pull my tasks out of my vault as a summary view, this can open up future automation options for me. However as I use multiple devices no single place was great and if I am on my phone it makes it harder.
As I am synchronizing my vault with git I decided to use a github workflow to help me out. I have it setup to run once a hour and extract all the tasks that are visible in the Obsidian Tasks plugin. These can be found as they always have the global task tag in them. In this example I use #task, update the regex as needed.
I needed to cleanup empty groups on a test subscription I had, using the Azure Cloud shell the following script will do it for you.
powershell code snippet start
This is more for me than anyone else. If you want to move to PowerShell core in Visual Studio Code then do the following.
CTRL + , to open settings.Shell: Windows in the search box.code snippet start
I like to ensure my calendar gets filled for the next week, this way I know what is happening and it is hard to book a last minute meeting to surprise me. I guess this is a productivity hack. If you book more than a week out then you can take whatever time you want that is open.
So after making the PowerShell script for Home Assistant I decided to spend a hour and pull it together to be a full module and push it up to GitHub. This is now in place and support just turning a switch entity on and off.
I wanted to turn on and off my office lamp from my desktop, sure I can use a switch but it is hooked up to Home Assistant so lets make it automatic! The main scenario was to toggle it at 10pm so when I get distracted it will let me know the time. You can use this for just about anything and at some point I will add more functions. Here is the snippet for now. You can set the values of global in your profile or in the launching script. As long as they are set this will work.
I do have a Linux machine in the house but that is on a Pi running as a squeezelite client for my house music collection. So looking at the instructions on the web I have translated them for use in Windows. Of course I have use PowerShell! The only addition I have is I use Kitty as a SSH client. This uses the approach @ http://www.dinnovative.com/?p=348
I am in the process of setting up OpenHAB for the extra functionality in my house. I have the ISY unit setup as the core brains for switches and scenes. All the other magic is in OpenHAB so if OpenHAB goes down the main functions of the house work. I wanted to get the OpenHAB system to be able to get the status from the ISY unit and also changes states. This was as not straight forward as I wanted. I still have a issue that the process is polling and not a subscriber model but I do not have time to create a ISY binding. Anyway, here’s the basic instructions.
I am playing with ISY and automation in my home, looking at the universal devices page today I found the API for working with the unit. Turning to trusty PowerShell I came up with the following code to enable you to start interacting with the unit remotely. Ill look at a proper module at some point in the future but this increases the possibilities of the unit!
I recently needed to get the Url of the CA for a SharePoint farm, after a bit of hunting in the API it was tracked down under the SPAdministrationWebApplication object.