search
top

How To Find A String in a File With PowerShell

Introduction So you have a need to have PowerShell to look for a string in a file and create and entry if it doesn’t find it and do nothing if it does. ¬†For my example I am installing an application and I need to add three lines of content, but if it exists I do not want duplicate entries created. The Code There are probably other ways to achieve the goal, but my idea was to use Get-Content and read... read more

Using PowerShell to Move Cluster Resources to Preferred Node on Windows Server 2008 and above

Introduction In an earlier post we covered Using PowerShell to Failover Cluster Resources for Patching, to expand on the script we are adding a third option for use on active / active clusters to move the Cluster Resources to their preferred node if it is defined. We will cover creating the move by itself and also incorporating it in the script covered in the earlier post. About the Script The purpose of... read more

How To Map a Network Drive With Encrypted Password with PowerShell

Introduction With the New-PSDrive cmdlet add to PowerShell 3, we can now mount any available PSProvder as a drive. This is great and simple to execute, but the real question is how can I do this and not send the password in clear text, but encrypted. The answer to that question is yes and in this post we will discuss how. The Process The first piece of the puzzle is to create a secure string password for... read more

Using PowerShell for EMC XtremIO

Introduction EMC have released XIOS version 4.1.10-33 and XMS version 4.2 recently and with this release they have added PowerShell support. Being a PowerShell guy this is a good thing for automation and maintaining EMC XtremIO. In this post we will cover downloading and installing PowerShell for XtremIO and a few of the available features. Installation Download the PowerShell Modules for XtremIO from... read more

How To Install Failover Clustering with PowerShell

Introduction In this post we will cover some more automation with PowerShell and in automating installing Failover Cluster features with PowerShell on Windows 2008 R2 and Windows Server 2012 R2. We will cover the commands available to install the features needed that can be run individually and also a simple script to install the features and log the results. So what are the features available to install... read more

« Previous Entries

top