Tag Archives: script

Search through Pwned Passwords with PowerShell

Troy Hunt recently released over 300 million SHA1 hashes of passwords that his Have I Been Pwned website has been collecting. The site allows you to search the database to see if your passwords are included in those from many … Continue reading

Rate this:

Posted in PowerShell, Security | Tagged , , , , , , , | Leave a comment

Send SMTP email with authentication from PowerShell

Email is a good way to send notifications from your PowerShell scripts, and it’s super easy. You just need an SMTP server, and use Send-MailMessage: You can even omit the -SmtpServer bit if you’ve previously set the $PSEmailServer preference variable. … Continue reading

Rate this:

Posted in PowerShell | Tagged , , , , , , , , , , , , , , , , , , | 2 Comments

PowerShell Profiles

If you use the PowerShell prompt a lot and/or the PowerShell ISE, you might find your life made a little bit easier by setting up a PowerShell Profile. All they are is a script that’s run each time you open … Continue reading

Rate this:

Posted in PowerShell | Tagged , , , , , , , , | 1 Comment

Restore malware-encrypted files from VSS snapshots

There have sadly been a few cases recently where a user has unwittingly run CryptoWall (or CryptoLocker, TeslaCrypt) on their PC and then encrypted a big chunk of one of my shared network drives. A nice quick way to get the … Continue reading

Rate this:

Posted in PowerShell | Tagged , , , , , , , , , , , , , , | 5 Comments

PowerShell script to update RDMS server list

Remote Desktop Services in Windows Server 2012 is great in many ways, but it has some serious flaws. One of these is the pretty terrible so-called Remote Desktop Management Server concept. This is actually just some functionality built into Server … Continue reading

Rate this:

Posted in PowerShell, Remote Desktop, Windows | Tagged , , , , , , , , , , , , , , , , | Leave a comment

Remove Forefront Client Security by force

I was recently trying to upgrade the Antivirus software on some servers from Forefront Client Security to System Center Endpoint Protection 2012 R2. On most servers it worked fine. However on a few I was unable to remove some of … Continue reading

Rate this:

Posted in Scripting, Security, Windows | Tagged , , , , , , , , , , , , , , , , | 2 Comments

PowerShell: Find MTU

I had some issues caused by MTU recently, and decided to write a script to test for the Maximum Transmission Unit that a network or host could cope with. I originally started off by using the PowerShell Test-Connection cmdlet, but … Continue reading

Rate this:

Posted in Networking, PowerShell, Scripting | Tagged , , , , , , , , | 2 Comments

PowerShell script to get temperature from NetBotz

Wrote this to extract the temperature reading from a few NetBotz devices that I have in my datacentres. Note that the second time I call the function, it is getting the temperature from a second (non-docked) sensor pod attached to … Continue reading

Rate this:

Posted in PowerShell, Scripting | Tagged , , , , , , | Leave a comment

Basic RDS 2012 R2 Shadowing Console

Whereas older versions of Windows had the tsadmin.exe utility, Server 2012 R2 doesn’t have anything equivalent. Helpdesk staff need a simple, easy to manage and configure console to allow them to shadow Remote Desktop users. Luckily this is pretty easy to achieve … Continue reading

Rate this:

Posted in PowerShell, Remote Desktop, Scripting | Tagged , , , , , , , , , , | 5 Comments

Find vSphere VM locations: Folder, vApp and Resource Pool

The vSphere client doesn’t seem to give you a nice overview where you can see all the location data about your virtual machines. You can see the Folder and vApp by expanding all the branches in the VMs & Templates view, … Continue reading

Rate this:

Posted in PowerShell, Scripting, vSphere | Tagged , , , , , , , , , , , , , , | Leave a comment