Viewing posts tagged PowerShell
This is a simple PowerShell function that performs an http GET against a sepcified URL, validates a few things about the x509 certificate and returns an object indicating whether the cert is valid and will expires soon. Here's the code:
The following code will attempt to find a Domain Controller that is site-local to the current computer. The only dependencies are PowerShell v3 and the ActiveDirectory module:
I recently needed a good way of picking from a list of volumes, free space and directory count where factors. I would almost expect that computing standard deviation and variance for a set of numbers would be built in to System.Math but in their absence, this is what I've come up with:
I've been using Hyper-V for development work lately and it's been fine, just like any other hypervisor. However, there is one nagging issue, numlock gets disabled when jumping between guests. What the heck? I haven't experienced this behavior with KVM, VirtualBox or VMWare and it's really not worth figuring out the cause when PowerShell can keep your numlock enabled.
Have you ever needed to grep to a ton of logs that reference AD objects, fetch those objects from AD and build a report? No?... Well let's just say you have. That can get pretty slow and round tripping to your local friendly domain controller can get out of hand. There are some easy ways to avoid making unnessessary queries, here's one of them.