# siliconpatch.com

Archive for the Uncategorized Category

## Harvesting Hardware Hash for Autopilot

Harvesting hardware hash for Microsoft Autopilot is simple for a single computer as can be seen at https://blogs.technet.microsoft.com/mniehaus/2017/12/12/gathering-windows-autopilot-hardware-details-from-existing-machines/.

SCCM if you are using it has a report that you can run the provides the Hash details for all your computers, but I have found about a 20% failure rate with the Hash provided and importing it into Autopilot with this method in testing. The Hash provided by the powershell script found in the article link above always works for me.

So how to run the Get-WindowsAutoPilotInfo script on computers including laptops that rarely come to the office and collect the data in a central place. Use SCCM to deploy a script to run Get-WindowsAutoPilotInfo on each computer and copy the output file to a central file share. Then gather that data to import it into Autopilot.

My SCCM deployment targets all Window 10 computers on which it runs batch file install.bat. This file copies Get-WindowsAutoPilotInfo and autopilot.bat to the targeted computers an runs autopilot.bat.

xcopy /s /e . c:\programdata\autopilot\
cd c:\programdata\autopilot
c:\programdata\autopilot\autopilot.bat

Autopilot.bat runs, generates a csv file and copies it to a fileshare.

powershell -executionPolicy bypass -file “Get-WindowsAutoPilotInfo.ps1” -OutputFile .\%computername%.csv -Append

xcopy *.csv \\fileshare\

Consolidating all the csv files into a single file is easily done with the powershell file found at https://code.adonline.id.au/merge-multiple-csvs-with-powershell/

$getFirstLine =$true

get-childItem “c:\path\to\files\*.csv” | foreach {?
$filePath =$_?

$lines = Get-Content$filePath  ?
$linesToWrite = switch($getFirstLine) {?
$true {$lines}?
$false {$lines | Select -Skip 1}?

}

$getFirstLine =$false?
}

## HP Utilities Removal

For desktop computers currently exclusively using HP. On the path to buying computers with a Ready to Provision Windows 10 build on them. But do to timing etc still buying some computers with a generic HP Windows 10 build on them that has a lot of HP utilities on them that are not wanted.

There are dependencies that require some utilities to have to be removed before others. The following script is what I came up with. Have to run it twice. the first time the computer will reboot after removing a few utilities. post reboot i run the script again. This is not eligant, but since I only had a few computers that needed clean up I chose to keep it simple.

Below is the script I used.

## Hello 2016

We finished off 2015 with a walk on the beach with the girls. Was a hot day so Piper was happy to go out in the water and cool off. Jazmine enjoyed checking around the rocks in the water. Not sure if she is hunting or what. Hazel likes the water but is unsure of the incoming waves.

New Years Day has been a bit cooler with rain in the weather forecast but we have yet to see the rain. This evening I played fetch with Hazel. The soccer ball has little air in it so she can bite and pick it up. Toss or kick it across the yard and she captures the moving ball and brings it back.

Picture below of her with the soccer ball gives some reference to how big she is getting.

## Puppy

We have for going on two years been been looking for a trying to get a Brittany Spaniel puppy. Well the one breeder in Australia we have been talking to finally had a litter and we got a puppy. She is currently in Perth Australia and has a to wait till she is 12 weeks old to be able to travel by plane to New Zealand.

We are naming her Hazel.

## Daylight Savings

On Sunday we switched to daylight savings. Just in time as the weather is slowly warming up. Saturday was a windy but nice 50 KM bike ride followed by coffee. The group of people doing these past two longer rides has been good for Emma and I, allowing us to ride a bit faster and farther that the earlier rides this season.

The transportation for the new puppy from Perth Australia to New Plymouth has been arranged. We have not chosen which puppy we want yet but the breeder has been taking pictures so we can get a good look at them to help us decide.

A week ago Monday when out running I turned my ankle and had to limp home with the dogs. Took the week off for the swelling to go down. Still hurts but I can run and bike now so healing up nicely.

## Farwell June

Another month has flown by. June brought us depending on where in New Zealand you were, rain, near record cold temperatures, snow and floods.

## Winter Chill

Winter does not start till June 1st, but has felt like it came early as for about the last week we have had a cold spell that is now looking to let up. Single digit temperatures at night and some rain most days. The girls don’t mind cause if the days are cool there is not reason they cannot go with us when we go shopping etc.

## A Few Notes

Winter made a short visit. We had snow on both Mount Taranaki and the ranges the other day, to go along with cold nights. We had to get the heat going in the lounge and use the electric blankets to be warm enough to get some sleep.

Got out for a group bike ride yesterday. The temperature was 15 – 17 degrees C so not too bad, but the downpour we ran into got everyone soaked. For the most part everyone stayed warm enough. For me was fun to get out on the bike again.

We got some photos from the Taranaki Masters Games

Waiting for our start times

Emma on the course

Emma with her gold medal.

## Masters Games Triathlon

A few weeks back we headed down to the port not knowing what the conditions would be. Checking wind conditions online showed a variety of wind conditions. When we first got a look at the sea it was very rough and not at all looking like conditions we wanted to swim in. The water conditions in the port were much better but we could see waves outside the port breaking over the break water displaying what conditions outside of the port were like. We got our numbers for the Taranaki Master Games Triathlon.

The swim start was different with having to navigate the at times large break to get out to open water. The first large wave I had to navigate I was still on by feet, I rode up the wave and came back down on my feet and my knee snapped backwards. I fell forward and started swimming. Two more large waves came and I swam into them surfer style going through the waves instead of riding over them. From that point on the going was pretty good with just some swells to deal with. With the swells I was a bit challenging seeing and navigating the buoys for the swim course but all went well.

The bike course is the same one we have ridden many times. The wind gave some people a case of the wobbles at times but overall the conditions were good.

The wind had no effect on the run, which was uneventful and i never once thought about how I jammed my knee during the swim.

Was a bit of a different event with many different races going on together, Club races, Masters Games, School Champs and duathlon.

## That Darn Cat

Last week we were having a nice sleep when the dogs got riled up. A neighbourhood cat had come in one of the windows. Emma went to put the cat out but it would not go out the door she opened for it nor the window it came in. A bit of cat herding later and the the cat was gone.

This past Saturday we went down to Hawera and did a sprint triathlon, 600m swim, 18km bike and 4.7 km run. It was a pool swim and they asked for the fast swimmers to line up first. Emma lined up near the front and when they opened the start chute no one would go so Emma stepped up and was first in the water. She held the lead till the half way mark when two swimmers passed her when they had to exit the pool, run to the start point and swim another 6 lengths. People were pretty good about getting in the pool with others near their speed so the pool did not get too congested.

The bike course was a two lap affair that took us out of town and back. There were two small climbs and a good cross wind that turned into a head wind on one leg of the bike.

The run was another two lapper taking us through the neighbourhood around the sports complex.

Emma had a really good swim, a strong bike ride but was not totally happy with her run. Unofficially she was second in her age group.

I had my usual average swim, I was happy with my bike, trying to go hard all the way and see what my run would be like after a hard bike leg. The run started out a bit rough but my legs came to me as I kept going and I was happy over all with how my race went.

Tonight we did our usual Tuesday night criterium. It was a new course just using the bottom half of the road course which made for of lots of climbing. It was hidden handicap so we all started at the same time and did 14 laps (12 km) and they handicap the results. I was first and Emma second. I thought I was doing well sitting 10 meters behind Emma. But near the end I was able to close in on her and pass her on the climb and was able to stay a head of her for the last two laps. I liked the course and hope we do it again. The win was the icing on the cake as I was quite happy with how I rode.