Realised that to get write-verbose to work you need [cmdletbinding()] at the top of your #powershell function. It’s a nice feature