Never been fond of using Try and Catch. Don´t like it´s not recommended to use in scripts. Powershell has a built in variable (boolean) that holds if the last command did execute or not ($?). So inPowershell we test executing something that will nor work. and then check $? to see what happens. asdfasdf $? We see that it returned False, eg the last command did not execute. And if…
Read MoreAbout Me
Carl Jägerteg is a Senior IT-Specialist at the nordic company Atea.
I have worked with IT since 2007 and are currently going through a certification process to get on paper my knowlege. My main focus is on Active Diectory and automation via Poweeshell, but also server management with Configuration Manager.
This is my personal blog. All issues are recreated in my lab environments and pictures come from there. The views presented here are my own and may not represent my employer.