Thursday, 2 June 2016

How to reboot multiple Virtual Machines on an ESXi host

Recently I got a request to schedule the reboot of multiple VMs on an ESXi host on every weekend.

Let me explain the scenario first. 

1. We need to schedule the reboot of all 50 VMs on every Saturday at 10.00PM (all those machines are Windows servers)

2. Both ESXi and vCenter are version 5.5

3. PowerCLI is installed on vCenter server.



Step-by-step Instructions


1. RDP to your vCenter server (if you are using vCenter server appliance you need to make changes on the below steps accordingly)

2. Make sure that you have enabled access for your domain user (domain administrator)\local server administrator so that they can access vCenter. If you haven't done this please follow https://virtuallylg.wordpress.com/2013/09/29/vsphere-5-5-how-to-add-domain-users-to-sso/

3. Open a notepad and copy paste the below script, save the file as 'VMReboot.ps1'

param(
    [parameter(Mandatory = $true)]
    [string[]]$vCenter,
    [parameter(Mandatory = $true)]
    [string[]]$vmName
)

$VIServer = Connect-VIServer $vCenter
If ($VIServer.IsConnected -ne $true){
    Write-Host "error connecting to $vCenter" -ForegroundColor Red
    exit
}

foreach($vm in $vmName){
        Write-Host "Going to restart $vm"
        Restart-VMGuest -VM (Get-VM $vm) -Confirm:$false
}

Disconnect-VIServer -Confirm:$false


4. Open PowerShell and test the script first (see below screenshot).


You need to mention your vCenter server and name of VMs you need to reboot. If you have multiple VMs separate the names with comma or if all VMs start with a common prefix use wild card (eg. "TestVM*")

See the VMs you have mentioned are getting rebooted. If the script works then schedule this job using Windows Task Scheduler

5. Open Task Scheduler and Create a basic task 

6. Mention your schedule and on Actions > Start a Program

Program/script : C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe

Add arguments-PSConsoleFile "C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI\vim.psc1" " &  "C:\VMReboot.ps1" -vCenter VCENTER-SRV -vmName "TestVM*"


Verify if the scheduled task is working by running it.

Enable Task History to make sure that the scheduled task is working properly



All the best!

Wednesday, 6 April 2016

Reviewing Google Apps for Education: How good is Google Apps for your School ?

I recently got a chance to implement and review Google Apps for Education in a school environment. So I just thought of sharing few information I acquired during my encounter with Google Apps. Hope this helps..!

"Cloud is changing the game"

What is cloud computing?


A solution allows companies to access IT-based services via the internet.

Cloud computing services operate at several levels:
  • Infrastructure as a service (IaaS)
  • Software as a service (SaaS)
  • Platform as a service (PaaS) 

How Cloud Computing Can Help in Education?

  • Potential Cost-savings : Moving to the cloud usually means moving away from a CAPEX model (physical assets that depreciate) to an OPEX model (pay per use).
  • Collaboration : It includes a wide range of communication and collaboration tools, ideal for conducting online classes or for providing peer to peer support or tutoring.
  • Backup : An important function of the Cloud is that it automatically saves content, making it impossible to lose or delete any valuable material.
  • Accessibility : Any data stored in the Cloud can easily be accessed from almost any device including mobile devices such as phones or tablets.
  • Storage : The Cloud allows its users to store almost all types of content and data including music, documents, eBooks, applications, photos, and much more. 
  • Flexibility : Offers the flexibility to meet rapidly changing software requirements for today’s and tomorrow’s teachers and students
  • No need for in-house expertise. Network managers can save a significant amount of time by reducing routine, operational tasks such as applying updates.

Google


No introduction is required for this name!

Just have a look at the verity of products they have :



Google for Education Products

45 million users among 190 countries are using Google for Education products.

Devices


Chromebooks, Chromeboxes and Tablets


Productivity Tools


Google Apps for Education Suite

This includes Classroom, Gmail, Drive, Calendar, Docs, Sheets ,Slides, Sites


Class Content


Apps, Books and Videos (YouTube For Schools)


More Products 


Google Cloud Platform, Chrome Browser, Google Search for Education, Google Maps for Education


Google Apps for Education & Office365 – A comparison
















Both offer a similar feature set:


  • Online storage : Google offers unlimited storage for education whereas Office365 provides only 15 GB of free storage 
  • Both have app marketplaces
  • Both are free for education market.
  • Both services provide apps for mobile devices, and both offer options for accessing files when offline.

For most schools the real ‘value’ of a platform lies in how well that platform can support learning programs.

Google Apps – The counterpart of AD ?

  • Google Apps is a cloud directory service (Hmm, not a straight forward statement!)
  • No need to spend money for buying expensive directory services like Microsoft Active Directory or maintain complex management software.
  • Google Apps is simple : to configure, manage and troubleshoot.
  • It's free and a perfect solution for schools.
  • Almost all the applications required for a school environment are available in Google Apps for Education.

Can You Use Google Apps as Your Directory Service/ Can we replace AD with Google Apps?



Well, it depends on three factors:
  • What “directory services” means to your organization ?
  • Which specific IT resources you need to run your organization?
  • Whether your organization is new (a startup, or launched in the past 7-10 years) or has been around for a while (anything longer than 10 years)?

What “directory services” means to your organization ?

  • Are you looking to centrally manage your users? Google Apps may do this well enough if all you want to control is access to Google Apps and some web applications. If you have more needs, Google’s directory won’t suffice.
  • Are you looking to control device and application access for your employees? If so, you may find Google Apps is limited. 
  • Do you have a BYOD culture? 
  • Does your organization have a high bar when it comes to security due to regulations or the fact that you store sensitive information?

Which specific IT resources you need to run your organization?

  • Complete an ‘IT Audit”
Audit your Hardware, Application and Server Infrastructure
  • Ask questions like :
1. Are we using one type of device, or are we using a mix? (i.e. Windows, Mac OSX, etc.)

2. Which teams are using Windows, which teams are using Macs, which teams are using Linux devices and why?

3. Do we provide our users with mobile phones and tablets or do we subscribe to a BYOD (Bring Your Own Device) model?

4. Are most of your apps Web-based solutions or hardwired? And how do we expect that to change to web-based within the next 5 years? 10 years?

5.Do you have any on-premise, legacy apps?

Whether your organization is new (a startup, or launched in the past 7-10 years) or has been around for a while (anything longer than 10 years)?

  • If you are a “born in the cloud” company mainly leveraging Google Apps and some Web-based services, Google Apps Directory could work for you in your early stages.
  • If your organization has been around for a while, is more diverse with your IT infrastructure, or is growing rapidly, Google Apps Directory will not give you the control you desire.
Well, now it's your turn to decide Google Apps for Education is good for your school or not?