Category: PowerShell Snippets

Cleanup Windows

Cleanup Windows

There are several temp folders that Windows uses to store "temporary" files, that being said, Windows is not very good at keeping its house in order. ...
Use PowerShell to Check .NET version and update

Use PowerShell to Check .NET version and update

This function will check the currently installed .NET version, if it is not at a minimum 4.6.1 then depending on if the Windows Server is 2008/2012 or ...
IIS with ASP.NET support check

IIS with ASP.NET support check

I have in the past had an occasion to check if IIS is installed with support for ASP.NET applications. This function will do all you need: function ...
Send Mail with PowerShell

Send Mail with PowerShell

We can create a basic function to send email with PowerShell by using the following, we will call it Send-SimpleMail. function Send-SimpleMail ([st ...
Reading and Writing to SQL Databases with PowerShell

Reading and Writing to SQL Databases with PowerShell

First let's start off by saying that this is not meant to be the end to end all solutions especially for large databases with thousands of records. Th ...
Fixing Domain Trust Relationships!

Fixing Domain Trust Relationships!

No, this won't fix human trust relationships! but it will help you with Domain Trust Issues. This seems to happen more and more, the common fix wa ...
Mapped Drive with Encrypted Password

Mapped Drive with Encrypted Password

Sometimes there is the need to create a mapped drive but you want to use an encrypted password for security reasons, this will work for you. First ...
Changing PWDLASTSET in Active Directory

Changing PWDLASTSET in Active Directory

There are times when you need to make a password policy change that could affect your users, for example let’s say your password policy is currently s ...
Moving files up a folder level

Moving files up a folder level

In the past I’ve used this small snippet to move tons of files and folders up a level. <# .SYNOPSIS Moves all subfolders in Source to same ...

Check Active Directory for Stale Computers

Several times I have need to generate a list of computers that are identified as stale, but as an extra measure I want to try pinging them. This s ...
10 / 10 POSTS