Create a virtual machine and adding a VHD file using powershell

Or: How you can use Powershell to create virtual machines!  With a few keystroke you can create a virtual machine and attach an existing VHD(X) file to it! I usually look for the fastest and easiest way to get things done. Always manually rebuilding my lab was tiresome and demotivating so I started to look at…


Launch: Windows server 2012!

So after much waiting and anticipating, server 2012 has been launched! Wooooooohhhhh!!!! Now get on to the real interesting bits, exchange 2013 :p!


Exchange: DAGs and reseeding

*repost from my old blog: I worked on a case today which had 2 Exchange 2010 servers in a DAG with about 6 mailboxes, all in healthy status. All but one that is. This DataBaseCopy just would not come back into sync and was stuck in the eternal Resynchronizing loop from hell. So our…


Exchange: Recovery Storage Group

As you might, or not, be aware off there is no item level based recovery in Exchange that is natively supported by Microsoft. So to perform recoveries we need the recovery storage group (captain obvious). The purpose of this is to mount the database you want to recover from on the Exchange server and use…


Exchange troubleshooting

*Repost from Exchange is a complex and large product which can have one thousand and one possible issues, one more obscure as the next. The purpose of this guide is to shed some light, where possible, to how things work in Exchange (and outlook), how they can break and how you should approach the…


Scripting: Adding PST files to an outlook profile automatically

This script will allow you to add all PSTs in a txt file (full path). On error resume next Const ForReading = 1 Dim arrFileLines() Dim objNetwork,ObjFSO,objFile,objNet,objOutlook i=0 Set objnet = CreateObject("") Set objFSO = CreateObject("Scripting.FileSystemObject") Set objFile = objFSO.OpenTextFile("c:\users\marcdek\temp\"& objNet.Username & "-PSTOUTPUT.txt", ForReading) Set objFSO = CreateObject("Scripting.FileSystemObject") Set objOutlook = CreateObject("Outlook.Application") Do Until objFile.AtEndOfStream…


Scripting: Remove all PST files in an outlook profile

Building on, this code will remove the mapping that has been done in outlook for ALL PST files. ‘On Error resume next Dim objOutlook ‘As Outlook.Application Dim Session ‘As Outlook.NameSpace Dim Store ‘As Outlook.Store Dim Stores ‘As Outlook.Stores Dim objFolder ‘As Outlook.Folder   Set objOutlook = CreateObject("Outlook.Application") Set Session = objOutlook.Session Set Stores = Session.Stores…


Powershell: Enumerating access rights on mailboxes

Don’t you just hate it when auditing times come around and they ask a list of each and every person who has access to each and every mailbox in your environment  –_-. Since this happened to one of my clients I wrote the following powershell command for exchange 2010. Take in to consideration the following:…


Restoring Exchange Server 2003 Clusters

When the worst happens it hits hard. Restoring a server is a lengthy process with users and managers alike breathing down your neck, so we try to help as much as possible where we can. The best advise I can give you is do this in a test environment a couple of times before you…