Currently Browsing: Powershell

Using PowerShell to Failover Cluster Resources for Patching

Introduction So you are having to patch cluster nodes and would like a way to automate the failover of the resources and log what when it was done and who did the work. In this post we will cover a simple PowerShell script that will drain and pull resources in a 2 node active / passive cluster. About the Script The purpose of the PowerShell script is to allow two operations to occur, they are to drain all... read more

How To Display Mount Points and Drives Using PowerShell

Introduction To continue on with more useful PowerShell we cover getting details on drives including drives that are using mount points. The Code For the most part we will be making a call to WMI using win32_volumes class and using auto format to output to a table. In the output we want to display Disk free space, total space, disk percentage as well as name and  drive letter. The name output includes the... read more

How To Manage WebSites using PowerShell on IIS 8

Introduction As PowerShell continues to evolve and more features are added with each OS release there is more places to use PowerShell to automate and make many tasks easy. In this post we will explore managing websites using PowerShell, so let’s get started. the examples used in this post are from Cognos modifications to the default IIS 8 install. The Code All of the commands we will be using are... read more

How to create a StartMenu link on the Desktop with PowerShell

Introduction With the interface changes to Windows 8 and above we see the ease of adding shortcuts by dragging or right clicking on the StartMenu links and sending to the desktop diminished,  but with PowerShell we can easily automate creating links to folders and applications. In this post we will see just how easy it is to create these  links. Code The code is simple, we will need to create a... read more

How To Use PowerShell to Retrieve User Account MemberShip data and Export to CSV

Introduction Recently had a request to retrieve specific information out of Active Directory and save the results to a CSV file for our auditors. The data to retrieve for the user is Name,Enabled,Created and MemberOf. The catch was to remove the CN and OU from the memberof output from PowerShell. In this post we will cover just how to accomplish that. Process The goal was to use PowerShell to retrieve the... read more

« Previous Entries Next Entries »