Category Archives: Technology

Get Boot Time For all computers in an OU – Powershell

I wrote the following script enumerates an OU and then looks up the last boot time for each computer.

Note: I’m starting to put any scripts I write on GitHub, this will make it easier for you copy down and easier for me to keep any scripts up to date.

Easy GPO Audit Using Powershell

After poking around the Group Policy Objects (GPO) of an infrastructure that was new to me I needed a decent way of producing a quick and useful report on the state of the GPOs.

Because the ComputerVersion and UserVersion numbers are listed as two figures, one for AD and one for Sysvol just an export-csv of get-gpo left me with blank ComputerVersion and UserVersion.

I found this post:

By using the following powershell I was able to within minutes provide useful information on the state of the GPOs.

get-gpo -all | select Displayname,ID,Description,GPOStatus,CreationTime,ModificationTime,@{Label="ComputerVersion";Expression{$}},@{Label="UserVersion";Expression={$_.user.dsversion}}| export-csv gpo-audit.csv

A small bit of conditional formatting later and we can see that the Domain GPO has a large amount of user setting edits and should be split into a user only GPO and a computer GPO (I won’t go into where these GPOs should be linked at this stage).
A snipping of an excel spreadsheet with colour coding providing meaning to the figures

SOLVED: False cursor position when entering and editing text in a cell in Excel

Similar to this article I was experiencing a false cursor position and the cursor position and text shifting when editing versus when viewing the cell

I played with the formatting and found that enabled LTR (Left to right formatting) helped, at least made it usable to edit the cell.

However I found the solution for me was to change the font!! Somehow the font the problem cell had become formatted as MS Shell DG font (a font I can’t actually see in the font browser now).
Changing the cell’s font back to the default Calibri resolved the issue!

I’m running Version 1708 (Build 8431.2131 Click-to-Run)

Solved: Updating partition details… Unable to open zip file. Error flashing zip

When trying to flash my old Motorola Xoom using this excellent guide I was unable to flash the system and google apps zips from TWRP and received the following error:

Updating partition details...
Unable to open zip file.
Error flashing zip '/sdcard/

The error wasn’t quite verbose enough. I found when I tried to have another stab at flashing the recovery partition Android was more helpful and told me that the battery level was too low.

Plugging the device in I was able to flash the device straight away and bring my Xoom back to life and make use of an old tablet again!