Category Archives: Quick Tip

PowerShell Maths

A colleague recently popped in a support request after noticing that the Calculator app wasn’t installed on their computer. This prompted an office discussion on how else you can solve sums when sat in front of a computer, and I mentioned you could just use PowerShell.

Open a regular PowerShell window and you can just start typing in basic sums

clip_image001

So addition, subtraction, multiplication, and division work fine- but what else can you do without making it complicated or hard to remember?

PowerShell this comes with the backing of the .NET Maths library, so you can enter [System.Math]:: (or just [Math]:: ) and then tab through possible operations – for example square root (see screenshot), power, trigonometry and so on.

clip_image002

There’s currently 35 methods in this library and you can get a full list of these using the GetMethods property. This example lists them nicely in comma delimited form so you don’t have to scroll this webpage too much 🙂

PS C:\> ([System.Math].GetMethods() |
Select-Object -Unique -Property Name ).Name -join ", "
Abs, Acos, Acosh, Asin, Asinh, Atan, Atan2, Atanh, Cbrt, Ceiling, Cos, Cosh,
Exp, Floor, Log, Log10, Pow, Sin, Sinh, Sqrt, Tan, Tanh, BigMul, DivRem, Clamp,
IEEERemainder, Max, Min, Round, Sign, Truncate, ToString, Equals, GetHashCode,
GetType

So, who needs a graphical Calculator app now?

Content Library fails to create when target datastore contains a space

Symptoms

A quick note on an issue I spotted in VMware vSphere 6.5 when creating a new content Library. If the datastore being used for the new library contains a space in it’s name then the Create Content Library process fails. The error given is “The specified parameter was not correct: The provided storage backing xxxxx xx for library xxxxx-xxxx-xxxx-xxx is invalid.”. For example, if a second vSAN cluster has been created and the default name “vsanDatastore (1)” was used for the datastore.

 

image

 

image

Solution

Rename the target datastore to a name which does not contain a space then repeat the Content Library creation process.

 

Notes

This occurred in my environment running vSphere 6.5 (vCenter VCSA build 6.5.0.14000) and hasn’t been thoroughly tested for repeatability (at least by me).

vRealize Operations Passwords

When setting up a new vRealize Operations 6.6 environment (using the vRealize Operations Manager Initial Setup wizard) the password is not accepted despite apparently meeting the complexity requirements.

The criteria stated are that passwords must:

  • Be at least eight characters long
  • Be different from your username
  • Contain lowercase, uppercase, numeric, and non-alphanumeric characters

VROps Manager Initial Setup

Cause

It appears that full stop and question mark do not count as the “non-alphanumeric” characters required.

Solution

Choose another password which includes a different, acceptable, non-alphanumeric character such as the exclamation mark.

GoPro Session SD Card Comparison

When using a GoPro Session Action camera it’s important to ensure that an approved MicroSD card is used. As this short video demonstrates, this really makes a difference to the performance. Two 32GB SanDisk MicroSD Cards, the first is the “Ultra” brand and the second the “Extreme” model which is listed on the approved card list. With the “Ultra” card it takes 30 seconds from the button being pressed to the camera starting to record. This is cut to just 2 seconds when using the “Extreme” card. Continue reading