Category: Script

PowerShell 0

Configure HPE G10 Server BIOS via PowerShell

Last post was about configuring HPE smart array and create logical drives on HPE G10 servers via PowerShell (HPE Scripting Tools for PowerShell). This post is about configuring HPE G10 BIOS via PowerShell by using HPE BIOS cmdlets. As I have mentioned in the last post, there are cmdltes available for Smart Array, BIOS, iLO and OA which helping administrators to configure and deploy servers faster than regular ways and without no additional cost. In order to configure HPE BIOS via PowerShell, you need to download and install HPE Scripting Tools for PowerShell: Scripting Tools for Windows PowerShell Sample Script...

PowerShell 1

How to Create Logical Drive on HPE DL580 G10 by PowerShell

I have published some posts about HPE Scripting Tools for PowerShell to automating physical server preparation and deployment services. The tools helping administrators to deploying services on HPE servers faster than normal ways, also there is no additional costs, just buy a PowerShell book! The scripting tools provides PowerShell cmdlets for configuring BIOS, iLO, OA and Smart Array. The tools are available for download as free tools on HPE website. Scripting Tools for Windows PowerShell The smart array cmdlets are compatible with HPE Generation 10 and not all smart array adapters. Read the user guide document to find list of...

PowerCLI 0

Invoke-VMScript Challenges with Linux Guest

There is some challenges for passing Linux commands with parameters to guest OS. In most of cases, administrators have to pass commands as a PowerShell variable also I had some bad experiences, as an example: run “Sed” with some special parameters. I have to use lot of double quotes and single quotes to pass command via Invoke-VMScript to guest OS.

PowerShell 2

Configure NTP on iLO via HPE Scripting Tools for Windows PowerShell

In order to keep synchronize iLO time with NTP server or time server, you have to enable NTP configuration and add proper NTP server address. Configuring NTP on more than one server is a difficult task for any administrator, because you have to do it via iLO command line or web based GUI manually. At this post I want to share an example for NTP configuration as a PowerShell script.

PowerCLI 3

[Script]: Check Time Synchronization with Host on Virtual Machines – PowerCLI

As you know, virtual machines can sync their time with ESXi host when VMware Tools is installed on the virtual machines. Also the configuration should be enabled on virtual machine configuration manually. The configuration is available on “Virtual Machine Properties”: If there is more than one virtual machine (Absolutely YES), the configuration should be enabled via an automation solution such as PowerCLI because enabling the configuration manually is very difficult. As all virtual machines don’t need to this configuration for time synchronization, administrators enables the configuration for some VMs when it needed. Some times, administrators have to provide a report...

PowerCLI 11

[How To]: Change Linux IP Address via PowerCLI

There is some reason that you want to change IP address on virtual machines as an example, moving virtual machines to a new VLAN or port-group or moving them to another site or replicate virtual machine to an offsite recovery site. Changing IP on machines one by one is very difficult on more than one machine and it be tougher. PowerCLI has cmdlet that it called “Invoke-VMScript”, the cmdlet lets you to run scripts on guest OS even when guest OS has no IP. But VMware Tools must be installed and also updated VMware Tools is recommended. Also you must...

PowerCLI 4

[PowerCLI]: Change Local Account Password on ESXi

Usually, administrators using same password on all servers for easier management and there is some security reasons to change the password periodically such as defining an expire time for password or when one of members is left company. Changing user’s password or many users password on a single host is too easy but what about more than host? You know, VMware has provided some automation tools such as PowerCLI. The automation tools will help administrators to do their tasks much easier and faster than GUI. In this post, you’ll find a simple solution for changing multiple users password on multiple...

PowerCLI 5

[PowerCLI]: Add Local Administrator Account on ESXi

The is some reason to have local user on ESXi servers even when there is vCenter server for management such as vCenter is inaccessible. You can use root user for doing operations on ESXi directly but some times, you have to ask someone to do the operations and then you will not have any tacking and all operation will be done by root user. So create user for trusted colleagues will help you to manage ESXi and track each user about what has he done. User creation is too easy, you can create users via vSphere Client (C# Client or...