All posts tagged: PoshUtils

PoshUtils: Downloading SharePoint 2013 prerequisites for offline install

Okay, this is yet another post on downloading the SharePoint 2013 prerequisites for offline install. I am sure you have seen many and everyone has their own way. But I think none of those posts/scripts – at least the ones I read – don’t give you a unified way to download the prerequisites for all combinations of Windows Server OS and SQL Server versions. So, here is my take. The idea of this script is to use the features of PowerShell 3.0 such as Out-GridView and default parameter values to reduce the amount of code required. Note: The list of prerequisites I compiled here is what I¬†perceived¬†looking at technet documentation. Do let me know if I missed out anything or need to change something here. Let us see the code first.

In the above code, I am using a CSV file I compiled with all the SharePoint 2013 prerequisite information. This is the key here. You can download the CSV file here. Instead of a hash, I preferred to use a CSV file as …

PoshUtils: Get all mirrored SQL databases using PowerShell and SMO

I have been validating different aspects of SQL mirroring and in the process I wanted a quick and automated way to handle database mirroring functions. This includes listing all mirrored databases, failing over databases manually to a mirrored instance, etc. So, in the process, I created several small functions in PowerShell to achieve what I wanted. I will share these functions as a series of posts and eventually, will release a PoshUtils module. So, in today’s post, let us see how we can retrieve a list of all SQL databases that are mirrored. This function can work with both default and named instances. Also, this assumes that you are using Windows authentication. Let us see the function:

When you run the Get-MirroredDatabase function, it returns a list of all databases that are mirrored and all properties of each database. You can filter the output by selecting the properties you want.