PowerShell Cron Script

I was looking for a way to schedule jobs and yes windows has a task scheduler built in, however I wanted a bit more flexibility and less complexity.

On the unix platform you can use cron. It is a scheduler that uses a simple format to define the time when the process should start and the process command.

I was going to look at using it when I thought about the parsing that would be needed, I dod not want a system that much that I would write a cron parser. So pulling up search I thought to see if I could find someone who has done this. And what do you know, I found a PowerShell script that would test a cron string and return the time of execution. Bingo!

Continue Reading »

Work at home and being a team

Now that we are dealing with COVID-19, a lot of companies are getting their employees to work remotely. For some this will be great and for other who crave social interaction not so great. For me the key thing is making sure that my team feels like a team still.

Keeping the routine going is pretty important. For yourself and your team. There are lots of great posts about this so I will just list the key points.

Continue Reading »

Running Home Assistant on Pine64

This is a dump of me setting up Home Assistant on a Pine64 board I have. I am used to OpenHAB and have created bindings for it so this should be a new challenge and a way to see how well it works. The reason I am heading towards Home Assistant is the components it support fit some of my needs better. Also time to get to know python better :)

Continue Reading »

Setting up Mosquitto on your Pi as part of the home hub

To enable all your nodes to communicate we are using a protocol called MQTT, on the pi we are using Mosquitto as the broker to support this. The broker allows nodes to publish information or subscribe to get information when it is published. MQTT uses simple channels to dictate where messages go, here are some examples:

HOME/Garage/DoorOne/State HOME/Garage/DoorTwo/State HOME/Garage/Temperature

The structure of the channel is up to you, just keep it short and logical! In these articles I will have them set to how I like them, feel free to change them as you need. To install Mosquitto on your Raspberry Pi run the following commands.

Continue Reading »

Setting up a Pi with a NRF24L01+ Radio

I’m using my PI as the central hub running OpenHAB, a MQTT broker and other services for home automation. On the Pi I am using a NRF24L01+pa+lna SMA Antenna Wireless Transceiver, this provide more range (1000m) from my main unit. All the nodes in the network will be running on Arduino chips and using a Mesh network so the house should have good coverage. First, wiring in the NRF24L01 to the Pi.Using Female-to-Female dupont cables use the following table to connect the units, the NRF24L01 is ~3-3.6V.

Continue Reading »

Dealing with Internet Explorer ‘Continue to this website’ option missing

Found the work around here: http://blog.oracle48.nl/internet-explorer-10-continue-to-this-website-option-missing/ To skip all the text on this page to the command one needs to unblock this restriction and for example set the minimum key length to 512; run the following in a elevated command line (cmd.exe ‘run-as-administrator’):

`certutil -setreg chain\minRSAPubKeyBitLength 512

Now the “Continue to this website (not recommended).” is back If you want to revert this change and go back to the default of an 1024 bit key minimum, run:

Continue Reading »

Windows 8 Release Preview with eeePC T101MT

I have followed the same steps with the new build from Windows 8 Consumer Preview with Eee PC T101MT and it is still valid.

Windows 8 Consumer Preview with Eee PC T101MT

I have a Eee PC T101MT and wanted to run Windows 8 on it. The same steps can be run on the Consumer Preview Time to tweak the graphics! As the resolutions is only 600 not 768 in vertical you need to do the following.

  1. Type in regedit, you will then be shown a icon of regedit click/press on it or press Win + R to get the run prompt.
  2. Press Ctrl+F and search for Display1_DownScalingSupported in the registry. This will take a while.
  3. Once it has been found set its value to 1 to enable scaling.
  4. Hit F3 a few times to make sure you got all instances.
  5. Exit regedit and reboot the laptop. You can use Win + C n settings if using the keyboard.
  6. Once restarted click on the desktop tile and right click on the desktop to chenge the resolution.
  7. You now should be able to select 1024 x 768 (Note: This scales the screen and does not add pixels so some text and images may look weird.

All Done! Enjoy Windows 8 on your netbook.   As a note Win + Z, X or C are your friends in Windows 8. I am using it with keyboard and mouse and have not really noticed any drop in productivity. In face having the combination of touch and keyboard with Windows 8 makes things faster!

Continue Reading »

Running Windows 8 on the Eee PC T101MT

I have a Eee PC T101MT and wanted to run Windows 8 on it. This entry takes you through the steps.

  1. Download the Windows 8 Preview @ http://msdn.microsoft.com/en-us/windows/apps/br229516 I downloaded the 32-bit version as it was smaller and I only have 2Gb on the machine. :)
  2. Go to the Microsoft Store and download the Windows 7 USB/DVD download tool @ http://www.microsoftstore.com/store/msstore/html/pbPage.Help_Win7_usbdvd_dwnTool this will allow you to put the ISO on a bootable USB key. Did I mention you need a 8Gb USB key? If not you do. Go shopping if you do not have one, they are handy and this entry will be here when you get back.
  3. Once the ISO is downloaded and the Windows 7 USB/DVD download tool is installed open up the tool and select the Windows 8 ISO as the source and USB Device as the destination, select the USB key you put in the computer and then click begin copying.
  4. Once completed get out the T101MT and plug it into the power and put the USB key in one of the ports. When it starts up hit F2 to go into the BIOS and make sure you have USB as a boot option. You should be promted to select the boot device, select USB and watch the pretty install.
  5. One that is complete, name you computer, connect to wireless (assuming you have wireless), use express (yep, im lazy), log in with your live ID (Syncing Goodness) and wait until it finishes configuring.
  6. You now have Windows 8 goodness.
  7. Time to tweak the graphics! As  the res os only 600 not 768 in vertical you need to do the following.
  8. Type in regiedit, trust me :) you will then be shown a icon of regedit click/press on it.
  9. Press Ctrl+F and search for Display1_DownScalingSupported in the registry. This will take a while.
  10. Once it has been found set its value to 1 to enable scaling.
  11. Hit F3 a few times to make sure you got all instances.
  12. Exit regedit and reboot the laptop.
  13. Once restarted click on the desktop tile and right click on the desktop to chenge the resolution.
  14. You now should be able to select 1024 x 768 (Note: This scales the screen and does not add pixels so some text and images may look weird.

All Done! Enjoy Windows 8 on your netbook.

Continue Reading »

Simple way to store credentials in Powershell

I know this is not the most secure way to store credentials but it works and is simple to manage. I use this when I need creds stored for accessing web based resources. To use it run the following: [code lang=“ps”] #To set Credentials Set-MyCredential -File c:\temp\thecreds.dat #To get Credentials $creds = Get-MyCredential -User domain\user -File c:\temp\thecreds.dat function Set-MyCredential($File) { $Credential = Get-Credential $credential.Password | ConvertFrom-SecureString | Set-Content $File } function Get-MyCredential($User, $File) { $password = Get-Content $File | ConvertTo-SecureString $credential = New-Object System.Management.Automation.PsCredential($user,$password) $credential } [/code]

Continue Reading »