Windows 10 -Disable IPV6- A Must Read!!!

Window 10 -Disable IPV6 – A Must Read!!!!

ipv6_ready_logordpLogordp_win7_main

 

We all know most or all organization are not yet ready for IPV 6-  I have seen out of the box testing with latest OS workstation and server release, forces IPV6 and the standard native disabling on Windows 10 didn’t disable it.

For example, typical step not enabling IPV6 – Uncheck Protocol on Network Card Setting- 

unchecknetworksettingsprotocolipv6

Screenshot show – that Internet protocol Version 6-TCP/IPV6 is uncheck.

 

Reference
How to Disable IPV6 On Windows 10.
http://www.techunboxed.com/2014/10/how-to-disable-ipv6-in-windows-10.html

 

Network Services DNS, DHCP & IPAM (DDI)

Automate IP Address Provisioning for Virtual Machines

The Infoblox VMware Cloud Adapter was developed for VMware vCenter Orchestrator (vCO)/VMware vRealize Orchestrator (vRO), which works in tandem with the VMware vCloud Director (vCD) and vCloud Automation Center (vCAC)/vRealize Automation (vRA). This adapter automates the processes of providing an IP address to a newly created virtual machine, updating DNS and configuring network devices quickly and efficiently.

The Infoblox VMware Cloud Adapter was developed for VMware vCenter Orchestrator (vCO)/VMware vRealize Orchestrator (vRO), which works in tandem with the VMware vCloud Director (vCD) and vCloud Automation Center (vCAC)/vRealize Automation (vRA). This adapter automates the processes of providing an IP address to a newly created virtual machine, updating DNS and configuring network devices quickly and efficiently.

Network landscapes are rapidly evolving, driven by trends in security, virualization, cloud, IPv6 adoption, and the Internet of Things (IoT). These modern demands require advanced solutions for managing critical network services in physical, virtual, and cloud environments.

 

Infoblox’s industry leading integrated, centrally managed approach to delivering enterprise-grade DNS, DHCP, and IP address management (DDI) supports current and evolving IT needs while providing the highest standards for security, service uptime, and operational efficiencies.

infoboxmain

infoboxmain2

Infloblox IPAM –

Reference
How Install Infoblox DHCP, IPAM and DNS- Virualization 
https://ww2.infoblox.com/evalS/Infoblox_Videos/vnios-cna-deploy.mp4

IPAM Automation with VMware and Infoblox Solutions
https://www.infoblox.com/resources/webinar/ipam-automation-vmware-and-infoblox-solutions

Windows Powershell-Introduction

Powershell-Intro Section

This section is posting to help with an introduction to Powershell. If you need know get more in-dept input on the Powershell Extension, Module, Cmdlets, and PowerCLI related topic.

 

Go to the section MS Power shell and and Vmware PowerCLI-

http://blog.itsysintegration.net/powershell-command-line-all-about/

What are variables?

whatisvaribles

  1. Unit of memory
  2. Begin with dollar sign(4)
  3. Variable names can include spaces and special characters. 
  4. Note case-sensitive:
    *Automatic (built-in)
    *User-defined

 i. Automatic Variables
a. Built-in
    b. Created and maintenance. by Power shell
    c. Store Power shell State. 

For example:

  • $Error : List of all errors
  • $? : Execution status of last operation
  • $HOME: User’s Home Directory
  • $Host: Object representing current host application for Poswershell
  • $NULL: NULL or empty value
  • $PSHOME: Full path of installation directory for Powershell
  • $True: Represents TRUE in commands
  • $False: Represent FALSE in commands

ii. User-Define Variables

  • Created and maintained by user
  • Existing only in current session
  • Lost when session is closed

iii.Variable CMDLETS

Vmwarecmdlets

 Constant and Read Only Variables

Constant
*cannot be deleted
*cannot be changed
i.e
PS:C:\> New-Variable -Name pi -value  3.1419265 -option constant

Read Only:
*Can be deleted (except using -force)
*Cannot be changed (except using -force)
i.e
PS C:\> New-varible -Name max -Value 256 -option Readonly

Example: User Defined Variable
Userdefinevariable

 

 

 

 

 

Data Type

*Everything is an OBJECT
*Each OBJECT has a TYPE

Example: Literal String

Create a variable
PS C:\  $a =123

Include the variable in a literal string(single-quotes)
PS C:\ $b =’As easy as $a’

Notice that $a is not expanded

PS C:\> $b
As easy as $a

Strings

*Simplify use of longer; more complex string assignments
*Here String can contain quotes, @ sign, etc

powershell1

powercli12

Variable Sub -Expression
*Returns the result of one or more enclosed statements
*Can be used to access an object property and concatenate its value within an expandable string.

powercli14

 


 

Determine the variable type
determinethevaraibleytpe

 

 

 

Use Variable in a String-

powershellvariableinstring

 

 

 

To be continue….

vRealize Operations Manager and Log Insight Integration

“The time has come to make your VROPS and Log Insight Integrated– to help your organization more “awesome”.. to predict, consolidate and preempted all events and sys logs, VROPS analytic virtual infrastructure data in one single paint of glass.”

registredvrops

vRealizeLogInsightIntegrationVROPS

VROPS and Log Insight Integration.

vRealize Operations Requirements
•Integration between LI and vR Ops requires at least vR Ops 5.6 Standard edition. In order to get the best integration, vR Ops 6.0 is highly recommended — more on this in a future post.•If you are running vR Ops Standard edition, then you will need the default admin user credentials.
•If you are running vR Ops Advanced or Enterprise edition then read only user credentials are sufficient.
•vR Ops Foundation edition is not supported for integration with LI.

•Launch in Context functionality — more on this in a future post.•If running vR Ops 5.7.1 standalone then you need to manually install the LI adapter.
•If running vR Ops 6.0 then you need to manually install the Log Insight management pack. Note that there is a newer management pack available on Solution Exchange that should be used instead of the default LI management pack on the vR Ops 6.0 download site.
Configuring vRealize Operations Integration
•Prerequisites•If running vR Ops 5.7.1 standalone, manually install the Log Insight adapter.
•If running vR Ops 6.0, manually install the Log Insight management pack.
•Navigate to Administration > vRealize Operations in LI.
•Enter the hostname, username, and password for the vR Ops instance and select Test Connection.
•Ensure both checkboxes are enabled.
•Select Save. Be patient as the initial configuration can take several minutes to complete

li-25-vrops-integration

There is some additional information about integration to be aware of:

  • To unconfigure integration (e.g. to switch to a different vR Ops instance), uncheck both checkboxes and then select Save.
  • LI can connect to a single vR Ops instance today, but multiple LI instances can be integrated with the same vR Ops instance.
  • If multiple LI instances are integrated with the same vR Ops instance then some integration benefits will only be available to the last configured LI instance — more on this in a future post.
vRealize Operations Manager

VMware PowerCLI Reset ESXI Host Root Password Script

Here is another useful PowerCli Script for VMware Administrator, especially during the time when organization required change all system accounts’ passwords – change password 60-90 days policy.

We all know it is a pain logging into ESXI Remote Console individually and setting the root password via ILO/DRAC/KVM (HP, Dell, and UCS)

So why not leaverage PowerCLI script to make things easier. For example, setting ESXI root password from powercli script.

I. Prerequisites

a. VMware Powercli 5 or 6  and  Existing ESXI Root Password,

b. Rest_esxi_root_password.ps1 and esxserver.txt script files. : Click below image to view what are the script files names:

scriptfiles

b. Edit esxserver.txt and add list of ESXI Host FQDN or IP Addresses in the esxserver.txt: Click below image to view the syntax of ESXI host list within the esxserver.txt

hostlist

III. Reset ESXI Root Password Code:

###########################################################################
# This script changes the root password on all ESX hosts in the esxservers.txt textfile
# Get old root credential
$oldrootPassword = Read-Host “Enter old root password” -AsSecureString
$oldrootCredential = new-object -typename System.Management.Automation.PSCredential -argumentlist “root”,$oldrootPassword
# Get new root credential
$newrootPassword = Read-Host “Enter new root password” -AsSecureString
$newrootCredential = new-object -typename System.Management.Automation.PSCredential -argumentlist “root”,$newrootPassword
$newrootPassword2 = Read-Host “Retype new root password” -AsSecureString
$newrootCredential2 = new-object -typename System.Management.Automation.PSCredential -argumentlist “root”,$newrootPassword2
# Compare passwords
If ($newrootCredential.GetNetworkCredential().Password -ceq $newrootCredential2.GetNetworkCredential().Password) {
    # Create new root account object
$rootaccount = New-Object VMware.Vim.HostPosixAccountSpec
$rootaccount.id = “root”
$rootaccount.password = $newrootCredential.GetNetworkCredential().Password
$rootaccount.shellAccess = “/bin/bash”
    # Get list of Host servers from textfile to change root password on
Get-Content C:\scripts\esxservers.txt | %{
Connect-VIServer $_ -User root -Password $oldrootCredential.GetNetworkCredential().Password -ErrorAction SilentlyContinue -ErrorVariable ConnectError | Out-Null
If ($ConnectError -ne $Null) {
Write-Host “ERROR: Failed to connect to ESX server:” $_
}
Else {
$si = Get-View ServiceInstance
$acctMgr = Get-View -Id $si.content.accountManager
$acctMgr.UpdateUser($rootaccount)
Write-Host “Root password successfully changed on” $_
Disconnect-VIServer -Confirm:$False | Out-Null
}
}
}
Else {
Write-Host “ERROR: New root passwords do not match. Exiting…”
}

###############################################################################

III. Download ESXI Root Password.

III. Step by Step Illustration.

a. Launch PowerCli -as – Run As Administrator.

openpowercli

b. Copy Reset_esxi_root_password.zip (download link above) and extra it on local machine.

*Please note, No need to type  Connect-VIServer, to log into ESXI or Vcenter,  the script will take host list and old password to authenticate in the systems, it is part of the  PowerCLI script .

logintopowercli

 

c.  Edit and save, the esxserver.text with ESXI host(s) you will be reset root password. (please note you must know the orginal root password to proceed to be successfully with Root Password set script. )

 

editesxihostlist

 d.Execute the Reset_esxi_root_password.ps1 >  .\Reset_esxi_root_password.ps1

runrootscript

 

e. You will get prompt to input old password.

promptoldpw

f. Then prompted for new password and confirm new password.

esxinewrootpw*Please note make sure the path to esxserver.txt is set correct.
By default it is set to c:script\esxserver.txt. Make sure it matches where both rest_esxi_root_password.ps1 and esxserver.txt is copied to local machine.
For example, here is the error message you will see:
Get-Content : Cannot find path ‘C:\scripts\esxservers.txt’ because it does not exist.
At C:\Users\richard\Desktop\Powercli\RootESXI\Reset_esxi_root_password.ps1:25 char:5
+     Get-Content C:\scripts\esxservers.txt | %{
+     ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : ObjectNotFound: (C:\scripts\esxservers.txt:String) [Get-Content], ItemNotFoundException
+ FullyQualifiedErrorId : PathNotFound,Microsoft.PowerShell.Commands.GetContentCommand

 

*if the old password was not input correct- it will error out with below message.

ERROR: Failed to connect to ESX server: x.x.x.x.

esxirooterror

 

g. Successfully reset ESXI host root password prompt.

resetrootpassw

 

Reference:
1. Change ESXI Root Password 
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1004659

2.PSCredential Class (System.Management.Automation
https://technet.microsoft.com/en-us/magazine/ff714574.aspx

 

 

VMware Powercli Script Configure DNS server, DNS domain, and NTP services

Here’s very useful Powercli Script for VMware Administrator to set DNS server, DNS domain and NTP server values, and restart NTP.

Illustrated Examples: ESXI Configuration: Time Configuration and DNS and Routing

ESXI NTP and DNS/Routing Configure Settings:

ntpsettings

dnsanddomain

Leveraging PowerCLI Script  that configure DNS server, the DNS domain, and NTP, and starts NTP service after completing configuration.

I. Prerequisites:
a.Identify DNS server, DNS domain, and NTP information:

NTP and DNS will be same address due to NTP is enabled and reference  to pool.ntp.org

Figure #1- DNS server configuration example:-Open DNS Manager on Domain Controller or Windows Admin Tools:

dnsserverconfigurationFigure #2 – Enabling Windows 2012 to point NTP pool.ntp.org  by running command -PS C:\Windows\system32> w32tm /config /manualpeerlist:pool.ntp.org /syncfromflags:MANUAL
The command completed successfully.
PS C:\Windows\system32> Stop-Service W32Time
PS C:\Windows\system32> Start-Service W32Time

enablingntpserviceonwindows2012

Figure#3-Validate NTP status by running command
-PS C:\Windows\system32> w32tm /query /status

NTPstatusonwindows2012

 

Solution make things easier , using Powercli DNS and NTP script –
script code:

##############################################################################

# PowerCLI Script to Configure DNS and NTP on ESXi Hosts
# PowerCLI Session must be connected to vCenter Server using Connect-VIServer
# Prompt for Primary and Alternate DNS Servers
$dnspri = read-host “Enter Primary DNS”
$dnsalt = read-host “Enter Alternate DNS”
# Prompt for Domain
$domainname = read-host “Enter Domain Name”
#Prompt for NTP Servers
$ntpone = read-host “Enter NTP Server One”
$ntptwo = read-host “Enter NTP Server Two”
$esxHosts = get-VMHost
foreach ($esx in $esxHosts) {
   Write-Host “Configuring DNS and Domain Name on $esx” -ForegroundColor Green
Get-VMHostNetwork -VMHost $esx | Set-VMHostNetwork -DomainName $domainname -DNSAddress $dnspri , $dnsalt -Confirm:$false
Write-Host “Configuring NTP Servers on $esx” -ForegroundColor Green
Add-VMHostNTPServer -NtpServer $ntpone , $ntptwo -VMHost $esx -Confirm:$false
Write-Host “Configuring NTP Client Policy on $esx” -ForegroundColor Green
Get-VMHostService -VMHost $esx | where{$_.Key -eq “ntpd”} | Set-VMHostService -policy “on” -Confirm:$false
   Write-Host “Restarting NTP Client on $esx” -ForegroundColor Green
Get-VMHostService -VMHost $esx | where{$_.Key -eq “ntpd”} | Restart-VMHostService -Confirm:$false
}
Write-Host “Done!” -ForegroundColor Green
Write-Host “Done!” -ForegroundColor Green
###########################################################################

II. Download NTP_DNS PowerCLI Scource Code:

III. Step by Step How To Configure DNS and NTP for newly built ESXI host.

a. Launch PowerCli and Run As Administrator

openpowercli

b. Log into the ESXI Host via PowerCLI

esxilogon

c. Execute NTP_DNS.ps1> type .\NTP_DNS.ps1

Ntp

d. You will get a prompt to input Primary, Alternative DNS, Domain Name, NTP Server one and two.:

primarydns

e. DNS_NTP script updates the both DNS and NTP on ESXI Host and Start NTP services.

finaldnsntpssettings

NTPrestrt

 

Reference:

NTP and DNS PowerCLI cmd-let
https://www.vmware.com/support/developer/PowerCLI/PowerCLI41U1/html/Set-VMHostNetwork.html


Enabling NTP on Windows 2013
http://www.sysadminlab.net/windows/configuring-ntp-on-windows-server-2012

Vmware PowerCli Mount Datastore Script

Here are some useful Powercli Script post building ESXI Hosts:

1. Mount Datastore(s) to ESXI Host PowerCLI script.

We all know mounting NFS Datastores to newly built ESXI hosts can be very tedious task, imagine, you have 20 ESXI Host and at least 5 to 20 multiple NFS Datastores to mount?

 

Mount Network File Share Datastore  – Manual process mount datastore via Vsphere UI will take forever. 

Solution make things easier , using Powercli script – New-Datastore script method- mounting multiple Datastore script code.

Below I will show script method that will save time for VMware Administrators.

I. Mount Datastore Script Configuration.

Save below script code as Mount_Datastore.ps1

############################################################################

#Connect to the VI Server if you are not connected already remove the comment designator
#This script mount NFS Datastore.
‘Reading CSV file’
#location of where datastore.csv is stored.
$vms = Import-CSV C:\Scripts\datastore.csv
‘Reading the contents of the CSV, and for each line execute the following code’
foreach ($vm in $vms){
‘Declaring variables that correspond to the column names in the CSV’
$vmhost = $vm.host
$dhost = $vm.dhost
$dpath = $vm.dpath
$dname = $vm.dnameWrite-Host “Creating Datastore on $vmhost”
‘Datastore mapping’
New-Datastore -nfs -vmhost $vmhost -name $dname -path $dpath -NfsHost $dhost}
‘Ending Script’
#################################################################################
II. Datastore.csv configuration:
#################################################################
host,dhost,dpath,dname
# ESXI host IP or FQDN, datastore server IP or Host,  Data Folder, Datastore Identification ,
Mvp-vs02.mvp.local, 192.168.2.9,/mnt/esx-vg1/app_volume/App_Datastore/App/, App,

 ####################################################################

ESXI host IP or FQDN: Figure#1

exihost

 NFS Datastore IP or Host, Folder, Datastore Identification: Figure #2

datastoreidentifer


 Step 2. Create a Datastore.csv with below configuration.

#################################################################

host,dhost,dpath,dname
# ESXI host IP or FQDN, datastore server IP or Host,  Data Folder, Datastore Identification ,
Mvp-vs02.mvp.local, 192.168.2.9,/mnt/esx-vg1/app_volume/App_Datastore/App/, App,
 ####################################################################
Step 3. Save mountdatastore.zip in a folder called scripts and copy it to local machine.
IV. Step by Step Illustration

1. log into the ESXI host via powercli

a .Launch Powercli and Run as Administrator.

 

openpowercli

B. Log in to the single entity ESXI Host by entering:

Connect-VIserver servername and ESXI host IP or Host
mountdatastoree1

C. Prompt to Input Root Credentials

esxihostroot

D.  Navigate to where Mount Datastore is locate on your desktop via Powercli Command Line.
I.E:  Datastore.cvs and Mount_datastore.ps1

mountdatastorefiles

E. Edit Datastore.csv with all multiple datastores to be mount.

I.E shows datastore.csv should look like
datastorecsvconfg

F. Execute the mount_datastores.ps1 script by typing the .\mount_datastores.ps1

runpwershel

G. Mounted Datastore Successful on ESXI Host.

mounsuccess1

mountscriptworked

Here is an example of multiple Datastores entries added to the datastore.csv.

*Notice the 1 datastore entry was already mounted in 1st script example, the script know it’s already mount and skips it.

New-Datastore : 11/21/2015 11:44:46 PM    New-Datastore        The name ‘App’ already exists.
At C:\Users\richard\Desktop\Powercli\New folder\Mountdatastore\mount_datastores.ps1:16 char:4
+       New-Datastore -nfs -vmhost $vmhost -name $dname -path $dpath -N …
+       ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo          : NotSpecified: (:) [New-Datastore], DuplicateName
+ FullyQualifiedErrorId : Client20_VmHostServiceImpl_NewNfsDatastore_ViError,VMware.VimAutomation.ViCore.Cmdlets.Commands.Host.NewDatastore

mountdatastorescript

Newly Datastore Mounted to ESXI Host.

Declaring variables that correspond to the column names in the CSV
Creating Datastore on 192.168.2.233
Datastore mapping
WARNING: Parameter ‘VMHost’ is obsolete. This parameter no longer accepts multiple values.
Name                               FreeSpaceGB      CapacityGB
—-                               ———–      ———-
APP3 NAS2 Datastore                     85.823         186.533
Declaring variables that correspond to the column names in the CSV
Creating Datastore on 192.168.2.233
Datastore mapping
WARNING: Parameter ‘VMHost’ is obsolete. This parameter no longer accepts multiple values.
App4                                   755.104       1,096.120
Declaring variables that correspond to the column names in the CSV
Creating Datastore on 192.168.2.233
Datastore mapping
WARNING: Parameter ‘VMHost’ is obsolete. This parameter no longer accepts multiple values.
OS Datastore                           162.606         323.842
Declaring variables that correspond to the column names in the CSV
Creating Datastore on 192.168.2.233
Datastore mapping
WARNING: Parameter ‘VMHost’ is obsolete. This parameter no longer accepts multiple values.
System Datastore                        31.323          95.297
Ending Script
I. E – ESXI Host with more add datastores mount to it.
exishostmountdatastore
Reference:
New-Datastore PowerCLI Command

Powershell-Major Features

Major Features:

  • Cmdlets
  • Pipeline
  • Providers
  • Help System

 


Cmdlets (also pronounced it “command-let”)
 are probably the most obvious feature when comparing Powershell to other scripting language. A cmdlet is a small, self contained piece of functionality that does one specific job.

For example: Get-command | Where {$_.pssnapin -like “Microsoft.p*.”}). count

 

The Get-Command generates a list Powershell commands and list is piped in a filter 

..(Where is the an alias or shorthand for where-object) that accepts those commands installed by a Powershell snapin. The method of extending powershell whose names start Microsoft P. Then count the number of commands in the filerterd list. As illustrated in Figure #1.

Figure#1.
PS C:\Users\ (Get-Command |where {$_.pssnapin -like “Microsoft.p*” } ).count
60

powershellgetcommand

Cases and Operators:
The operator -like is used to perform the comparison in the Figure#1- For example,  

All cmd-lets has a verb-noun syntax. It starts with verb. The second part is a nount that describes what the verb is actingin on – in this case.

Get-Command with -Noun and -Verb

As you get to know PowerShell better so you become familiar with verbs such as ‘Set’ or ‘Get’ and nouns such as ‘Process’ or ‘Computer’.  This is why I now prefer to filter Get-Command with -Noun or -Verb.  One of my greatest successes was finding ‘Restart-Service’.  I had used start and stop-service, but when I tried this filter I unearthed the useful Restart-Service.

# PowerShell Get-Command Nouns
Clear-Host
Get-Command -Noun Service

Also Verbs

# PowerShell Get-Command Nouns
Clear-Host
Get-Command -Verb S*

Note 2: I could have chosen -Verb Set, but I wanted to show you that -Verb also take wildcards*.

Get-Command -Module

Firstly list your modules with Get-Module.  Make your selection, for example, ISE.

# PowerShell Get-Command Module info
Clear-Host
Get-Module ISE

Here is another example which imports a modules then checks the cmdlets.

$Baskets = “PSDiagnostics”
Import-Module $Baskets
Get-Command -Module $Baskets

Tab Completion:
Powershell demonstrators another feature that aids productivity: Tab completion. If you type Get- and press tab key, the PowerShell engine will complete the command with the first cmdlets that matches what been typed.

As with the cmdlets names, the more of the paramters name you give, the sooner the process brings.

Aliases
As an alternative to typing the full name of a cmdlet or parameters, it’s possible to use an alias.

alaispowershell

Creating a New Windows PowerShell Alias

So you say that you like Windows PowerShell, but you have problems remembering some of the cmdlet names? Well, then why not create an alias for those cmdlets, an alias that you can remember? For example, maybe you’d prefer to type show instead of Get-ChildItem. If that’s the case, then you can use the New-Alias cmdlet to map the term show to Get-ChildItem. All you have to do is call New-Alias followed by the alias name (show) and the cmdlet the alias is being mapped to (Get-ChildItem). You know, something like this:

New-Alias show Get-ChildItem

Now, what do you suppose will happen the next time you type show in the Windows PowerShell console? You got it:

Windows PowerShell
By default, aliases are not saved between Windows PowerShell sessions: each time you restart Windows PowerShell you’ll need to recreate the alias. To ensure that your new aliases survive between Windows PowerShell sessions, create a PSConfiguration folder in your Windows PowerShell profile folder. For example:

C:\Documents and Settings\gstemp\My Documents\PSConfiguration

Note. How are you supposed to know your Windows PowerShell profile folder? Just type this command:

Get-Variable profile | Format-List

In the PSConfiguration folder, create a file named Microsoft.PowerShell_profile.ps1 and add the following command to the file:

Set-Alias show Get-ChildItem

 

 

 

 

Reference:
Powershell cmdlet Verb-Noun 
https://technet.microsoft.com/en-us/library/dd315315.aspx

VMware vCenter Orchestrator Applicance-5.5.3

vCenter Orchestrator (vCO) 5.5 – Part 1 Deploying the Virtual Appliance

vCenter Orchestrator (vCO) is a product which allows you to create tasks and automated workflows which and be run directly within vSphere Web Client or the vCenter Orchestrator Client.

There are a number of pre-made workflows to get your started, and the number of tasks you can perform is quite amazing. Any task that can be performed in vCenter can be automated through vCO, and thats just the start. Add some Active Directory integration, API’s and other 3rd party plugin’s.

Workflows can be anything from simple workflows that contain a single task to say create a virtual machine, to complicated workflows containing many tasks that might build an entire solution and integrate with 3rd party plugins.

One of the best things about vCO is it’s included with vCenter Server and it’s free!

Here are high levels of the VCO 5.5 configuration Guides will cover.

  • vCenter Orchestrator (vCO) 5.5 – Part 1 Deploying the Virtual Appliance
  • vCenter Orchestrator (vCO) 5.5 – Part 2 Configuring vC
  • vCenter Orchestrator (vCO) 5.5 – Part 3 Using vCO and Running a Workflow

 

The latest version of vCenter Orchestrator (vCO) is 5.5.1 and has come on leaps and bounds since I originally saw it. This is my first proper look into vCO, it’s features and it’s going to take some time getting used to it. Not because it’s difficult to use, more because the possibilities seem quite endless and understanding what cool things are possible might take some time to discover. However I did find it difficult to find a decent resource to quickly get it up and running and hopefully this blog will address that for others.

 

vCO can be deployed in a number of ways, all achieve the same end solution and integrate with vSphere Web Client and Single Sign On.

  • Installed on a Windows Server (Co-installed with vCenter Server)
  • Installed on a Windows Server (Standalone)
  • Virtual Appliance

 

Production deployments such use a SQL server (not SQL express or the embedded DB in the appliance).

I’m going to use the virtual appliance and the embedded PostgreSQL database in my lab. I had to choose one and as I understand vCO so far there are no gotcha’s using the VA so I thought I’d go for that.

The virtual appliance weighs in at 2vCPU, 3GB vRAM and 12GB vDisk (Thick provisioned)

1. You may have noticed the vCenter Orchestrator plugin within the vSphere Web Client. Following the vCO icon takes you into vCenter Orchestrator with 0 vCO servers and no workflows.

 

2. Download the vCO Server Virtual Appliance

3. Deploy the vCO .ova template to the ESXi host or cluster.

 

deployovftemplate

 

4. Select the .ova file, Next.

vcoovadeploy

 

5. Check the vCO version and size on disk, Next.

 

vcoovadeploy2

 

6. Accept the EULA (Click Accept), Next.

 

vcoovadeploy3

 

7. Give the vCO VA a name (I chose VCO1), select a DC or folder, Next.

 

vcoovadeploy4

 

8. Select Thick or Thin provisioned disk and the datastore to deploy to, Next.

vcoovadeploy6

9. Select the network to connect to and choose IP protocol IPv4, Next.

10. Enter a complex password (8 chars, include UPPER, lower, number and spec!al char)

11. Enter the Default GW, mask, IP address and DNS server IP.

 

vcoovadeploy8

 

12. Review your settings, tick “Power on after deployment” and Click Finish!

 

vcoovadeploy9

 

13. You will see the “Deploy OVF template” task run, this will take several minutes.

14. While you wait for it to deploy create a DNS A record for your vCO appliance
(e.g. vco.mvp.local)

 

vcoovadeploy10

 

 

15. Once the vCO virtual appliance has finished deploying it will power on.

Checking the console you will see that the appliance has booted and has the correct IP address, we are now ready to configure the appliance and vCO.

 

Note: Check you can ping the DNS name you created earlier (e.g. vco.mvp.local)

vcoconsoleview

 

1. Now you have the vCO appliance deployed, powered on and it has an IP address (plus the DNS A record you created)

dnsentry

 

2. Open your web browser to <ip address or FQDN> ” port 8283

https://vco.mvp.local:8283

https://vco.mvp.local:8283

3. Login with Username: VMware

Password: <The Password Set During OVF Deployment>

vcologon

4. Now you are logged into the vCO Configuration page, here we need to make a number of configurations before vCO will work.

 

5. First go to Network –> SSL Trust manager

6. You want to import from URL your vCenter and SSO certificates so you can connect to them later on in the config

 

e.g. https://vcenter01.mvp.local and https://vcenter01.mvp.local:7447

vconetworkcfg

 

7. You will be prompted to accept the certificate. Click Import.

 

 

 

8. You will now see your certificates within the SSL Trust Manager

 

 

vconetworkcfg1

9. Go to Authentication

You can use either SSO or LDAP Authenication. in below example, We will use LDAP Authenication.

 

10. Select “LDAP Authenication”

(*For SSO Authenication you can us below administrator@vsphere.local.

*Enter your SSO server details (e.g.,https://vcenter01.mvp.local:7447 your SSO administrator (this might be administrator@vsphere.local and  SSO administrators password)

 

11. Click Register Orchestrator.

 

authenication

13. Now you need to select a “vCO Admin – domain and group” you can manage vCO (this could be vsphere.local Administrators, or your Domain Admins group if configured in SSO)

 

14. Click Update Orchestrator Configuration, all the dots next to the config items will turn green indicating that config is complete.

 

15. Go to vCenter Server

16. We need to add a vCenter Server so browse to the New vCenter Server Host tab and enter the details of a vCenter Server, Click Apply Changes.

17. Check your vCenter Server has been added in the Hosts tab.

18. Go to Licenses

19. Select “Use vCenter Server license” and enter your vCenter server details

20. Go to Plug-ins

21. Ensure the plugins are enabled, enter your SSO user and Click Apply changes

22. Go to Network

23. In the IP Address box select the IP address that the vCO service should bind to and Click Apply

24. Go to Startup Options

25. Under vCO Server, Click “Restart service”.

This will restart the vCO service, binding the vCO service to the correct network interface and also set the SSO authentication.

  • vCenter Orchestrator (vCO) 5.5 – Part 3 Using vCO and Running a Workflow

vcosnaphshot30daysRemove old snapshots 30 days. 

 

snapshotremoveworkflowsnapshotremovalworkflow2Vcenter Tasks Show Snapshot are remove based on VCO Remove Old snapshots -< 30 days criteria-  
snapshotremoveal
snapshotremovallogs

Reference
VMware vCenter Orchestrator Applicance 
https://www.vmware.com/support/pubs/orchestrator_pubs.html

 

Powershell-Build-In Command Line Tools

Powershell has a build-in command line tools-

powershell

  • Get-Help
  • Get-Command
  • Get-Member
  • Get-PSDrive

Get-Help command line based analogous to the main files available

  •  Information specific to an individual CMDLET, for example, Get-Help followed by the cmdlet name
  • Powershell lanaguage and evnironment information, accessed by Get-Help followed by about_topic _name.

 

Helpcommand

Helpcommand2Get-Help

Display information about Windows PowerShell cmdlets and concepts.

Syntax
Get-Help [[-name] string] [-component string[]]
[-functionality string[]]
[-role string[]] [-category string[]]
[ {-full | -detailed | -examples | -parameter string}]
[-Online] [-Path string] [CommonParameters]
Key
-name
Request help about string
A cmdlet name, topic, alias, script or function name. Wildcards are permitted.
e.g. -name Get-Member, -name “About_Object”, -name “ls”
The “-Name” is optional.

-category
Display help for items in the specified category.
Valid values are:  Alias, Cmdlet, Provider, and HelpFile.
Conceptual topics are in the HelpFile category.

-component
Display a list of cmdlets with the specified component value,
such as “Exchange.”

-detailed
Display additional information about a cmdlet, including
descriptions of the parameters and examples of using
the cmdlet. This parameter has no effect on displays
of conceptual (“About_”) help.

-examples
Display examples of using the cmdlet.
To display only the examples, type
“(get-help cmdlet-name).examples”.

-full
Display the entire help file for a cmdlet, including
technical information about the parameters.
This parameter has no effect on displays of
conceptual (“About_”) help.

-functionality
Display help for cmdlets with the specified functionality.
Wildcards are permitted.

-Online
Display the online version of a help topic in the default Internet browser.
This parameter is valid only for cmdlet, function, and script help topics.
see Help about_Comment_Based_Help

-parameter
Display a detailed description of the specified parameter.
These descriptions are included in the Full view of help.
Wildcards are permitted.

-Path string
Get help that explains how the cmdlet works in the specified provider path.
Enter a Windows PowerShell provider path.

This parameter is effective only for help about a provider cmdlet and only when
the provider includes a custom version of the provider cmdlet help topic.

Go to the provider path location and enter Get-Help or, from any path location,
use Get-Help -Path. For more information, see about_Providers.

-role String
Display help customized for the specified user role.
The role that the user plays in an organization.
This parameter has no effect for the core cmdlets.

CommonParameters:
-Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable,
-OutBuffer -OutVariable.

Get-Command

Commands are the fundamental part of any shell language: ;They are what you type to get things done.

command – parameter1 -parameters2 argument1 argument2

|               |                  |                    |                |

command name : switch parameter : parameter with argument”  positional argument”

Get-Command is complementary to Get-Help. For example, you type Get-Command at the Powershell prompt, you will see Alissa, Functions and Cmdlet ”

getcommand

getcommand2

For example, Get-Command ipconfig.exe: |format -List

getomandipconfigGet-Member

Get-Member is the best described as the Swiss Army knife of Powershell, Type; Get-Help Get-Member to display it.

Getmember

NAME
Get-Process

SYNOPSIS
Gets the processes that are running on the local computer or a remote computer.

SYNTAX
Get-Process [[-Name] [<String[]>]] [-ComputerName [<String[]>]] [-FileVersionInfo] [-InformationAction {SilentlyContinue
| Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable [<System.String]>]] [-Module] [<CommonParameters>]

Get-Process [-ComputerName [<String[]>]] [-FileVersionInfo] [-InformationAction {SilentlyContinue | Stop | Continue |
Inquire | Ignore | Suspend}] [-InformationVariable [<System.String]>]] [-Module] -InputObject <Process[]>
[<CommonParameters>]

Get-Process [-ComputerName [<String[]>]] [-FileVersionInfo] [-InformationAction {SilentlyContinue | Stop | Continue |
Inquire | Ignore | Suspend}] [-InformationVariable [<System.String]>]] [-Module] -Id <Int32[]> [<CommonParameters>]

Get-Process [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable
[<System.String]>]] -Id <Int32[]> -IncludeUserName [<CommonParameters>]

Get-Process [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore | Suspend}] [-InformationVariable
[<System.String]>]] -IncludeUserName -InputObject <Process[]> [<CommonParameters>]

Get-Process [[-Name] [<String[]>]] [-InformationAction {SilentlyContinue | Stop | Continue | Inquire | Ignore |
Suspend}] [-InformationVariable [<System.String]>]] -IncludeUserName [<CommonParameters>]

DESCRIPTION
The Get-Process cmdlet gets the processes on a local or remote computer.

Without parameters, Get-Process gets all of the processes on the local computer. You can also specify a particular
process by process name or process ID (PID) or pass a process object through the pipeline to Get-Process.

By default, Get-Process returns a process object that has detailed information about the process and supports methods
that let you start and stop the process. You can also use the parameters of Get-Process to get file version information
for the program that runs in the process and to get the modules that the process loaded.

RELATED LINKS
Online Version: http://go.microsoft.com/fwlink/p/?linkid=290498
Debug-Process
Get-Process
Start-Process
Stop-Process
Wait-Process

REMARKS
To see the examples, type: “get-help Get-Process -examples”.
For more information, type: “get-help Get-Process -detailed”.
For technical information, type: “get-help Get-Process -full”.
For online help, type: “get-help Get-Process -online”

Get-PSDRIVE

Get-PSDRIVE displays information about the providers that are currently installed. Full details were supplied

Get-PSDrive

getdrive

Get drive information (gdr)

Syntax
Get-PSDrive { [[-name] string[]] | [-literalName] string[]  }
[-Force] [-pSProvider string[]] [-scope string]
[-UseTransaction] [CommonParameters]

Key
-name string
Get only the specified drives.
Type the drive name or letter without a colon (:),
separate multiple names with commas.

-literalName string
The Drive name which will be used exactly as typed.
No characters are interpreted as wildcards. If the name includes escape
characters, enclose it in single quotation marks.

-pSProvider
Get only the drives supported by the specified PowerShell provider.
Type the name of a provider, such as:
FileSystem, Registry, or Certificate.

-scope
The scope within which to search for the drive.
Valid values are “Global”, “Local”, or “Script”, or a number relative
to the current scope (0 through the number of scopes, where 0 is the
current scope and 1 is its parent).
“Local” is the default. For more information, see about_Scopes.

-UseTransaction
Include the command in the active transaction.

CommonParameters:
-Verbose, -Debug, -ErrorAction, -ErrorVariable, -WarningAction, -WarningVariable,
-OutBuffer -OutVariable.

Standard Aliases for Get-PSDrive: gdr

Get-PSDrive gets the PowerShell drives in the current session. You can get a particular drive or all drives in the console.

Get-PSDrive gets the following drives:

– Windows logical drives on the computer, including drives mapped to network shares.
– Drives exposed by PowerShell providers (such as the Certificate:, Function:, and Alias: drives) and the HKLM: and HKCU: Registry drives.
– Drives created with New-PSDrive.

Get-PSDrive does not get Windows mapped drives that are added or created after the PowerShell console is opened.

Examples

Display information about all currently visible drives:

PS C:\> get-psdrive

Display the description of a PowerShell drive on your system:

PS C:\> (get-psdrive DriveName).description

Display information for drives with names that begin with HK (registry: HKLM, HKCU etc):

PS C:\> get-psdrive HK*

Display information for FileSystem drives:

PS C:\> get-psdrive -psprovider filesystem

References:
Powershell.exe Command Line Help.
https://technet.microsoft.com/en-us/library/hh847736.aspx