powershell

HPE ProLiant PowerShell SDK

Some days ago, my colleague Claudia and I started to work on a new project: A greenfield deployment consisting of some well known building blocks: HPE ProLiant, HPE MSA, HPE Networking (now Aruba) and VMware vSphere. Nothing new for us, because we did this a couple times together. But this led us to the idea, to automate some tasks. Especially the configuration of the HPE ProLiants: Changing BIOS settings and configuring the iLO.

Get-MailboxDatabase doesn't show last backup timestamp

Sometimes you have to check when the last backup of an Exchange mailbox database was taken. This is pretty simple, because the timestamps of the last full, incremental and differential backup is stored for each mailbox database. You can check these attributes using the Exchange Control Panel (ECP), or you can use the Get-MailboxDatabase cmdlet. Backup successful, but no timestamp? Take a look at this output. As you can see, there’s no timestamp for the last full, incremental and differential backup.

Exchange Management Shell (EMS) and new PowerShell releases

Some day ago, I installed a new Exchange 2013 CU11 for some test ins my lab. Nothing fancy, just a single server deployment on a Windows Server 2012 R2 VM. I deployed this Windows Server from a template, which was updated with the latest Windows Patches and WMF some days ago. The Exchange setup went smooth. I updated the SSL certificates and the internal and external URLs for the virtual directories.

PowerShell ISE on steroids

I’m not a developer. I deal mainly with infrastructe, things like virtualization, storage & backup, networking etc. Sometimes I had to write scripts, primarily PowerShell, batch or Bash. Many years back, I also wrote Csh and Ksh scripts. In the past years, automation was one of the rising trends in the infrastructure segment. And with automation, new challenges came up. Today I have to work with Windows PowerShell, in case of VMware with PowerCLI (which bases on Windows PowerShell), and sometimes I have use with REST APIs.

PowerCLI: Get-LunPathState

Careful preparation is a key element to success. If you restart a storage controller, or even the whole storage, you should be very sure that all ESXi hosts have enough paths to every datstore. Sure, you can use the VMware vSphere C# client or the Web Client to check every host and every datastore. But if you have a large cluster with a dozen datastores and some Raw Device Mappings (RDMs), this can take a looooong time.

Starting and stopping Azure VMs with Azure PowerShell

To be honest: I’m lazy and I have a wife and two kids. Therefore I have to minimize the costs of my lab. I have a physical lab at the office and some VMs running on Microsoft Azure. Azure is nice, because I only have to pay what I really use. And because I’m only paying the actual use, I start the VMs only when I need them. Inspired by this very handy Azure VM wakeup & shutdown script, I decided to write my own script (yes, I invented a wheel again…).

Automating ESXi configuration for DataCore SANsymphony-V

DataCore describes in their Host Configuration Guide for VMware ESXi some settings that must be adjusted before storage from DataCore SANsymphony-V storage servers will be assigned to the ESXi hosts. Today, for ESXi 5.x and 6.0, you have to add a custom rule and adjust the advanced setting DiskMaxIOSize. For ESX(i) 4 more parameters had to be adjusted. But I will focus on ESXi 5.x and 6.0. You need to adjust these settings for each host that should get storage mapped from a DataCore storage server.

How to shrink thin-provisioned disks

Disk space is rare. I only have about 1 TB of SSD storage in my lab and I don’t like to waste too much of it. My hosts use NFS to connect to my Synology NAS, and even if I use the VAAI-NAS plugin, I use thin-provisioned disks only. Thin-provisioned disks tend to grow over time. If you copy a 1 GB file into a VM and you delete this file immediately, you will find that the VMDK is increased by 1 GB.

Load VMware PowerCLI snap-in automatically in PowerShell ISE

The PowerShell Integrated Scripting Environment (ISE) is a very handy application when dealing with the PowerShell. And because of this, the ISE is also a very handy application when dealing with VMware PowerCLI. When I write a script or a one-liner, one of the first things I do is to load the necessary snap-ins. And because I’m lazy, I’m trying to automate everything, what I have to do more than once.

Backup DataCore SANsymphony-V config using PowerShell

In November 2013 I published a PowerShell script on blazilla.de that creates a backup of your SANsymphony-V config by using the DataCore SANsymphony-V PowerShell cmdlets. I would like to thank Marcel, Michael and Frank for their feedback and comments to improve the script. The password is stored in the securestring.txt that needs to be stored in the same directory as the script. Kudos to Marcel, who has the part of the script contributed, that stores the password in an encrypted file.