Currently Browsing: Powershell

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

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

Microsoft Releases PowerShell for Linux and OSX

Alright, I hear the comments now from the Linux guys, me included. PowerShell on Linux? Well yes, Microsoft has released PowerShell for Linux and OS X. It is available here Feeling a bit adventurous? Go ahead and download the Alpha and start playing. Here are the Installation instructions as per Microsoft. Currently supports Ubuntu 14.04, Ubuntu 16.04, CentOS 7,... read more

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

« Previous Entries