Monday, February 15, 2016

CheckPowershell version

There are serveral ways to check the install version of Powershell:


$PSVersionTable variable
or
user  the automatic $PSVersionTable variable, and check the PSVersion property,


Get-Host


Wednesday, April 9, 2014

Check Heartbleed bug vulnerability


check if our linux version is affected  by:

check openssl version
type :
openssl version

 


how to check linux OS version:
cat /etc/issue


 
Heartbleed test free tool:
http://filippo.io/Heartbleed/

the following  OpenSSl libraries are afected :

OpenSSL 1.0.1 through 1.0.1f (inclusive) are vulnerable
OpenSSL 1.0.1g is NOT vulnerable
OpenSSL 1.0.0 branch is NOT vulnerable
OpenSSL 0.9.8 branch is NOT vulnerable

Wednesday, February 12, 2014

Add CPU memory to an existing ESXi Virtual Machine via Powercli



At the Powercli cmd prompt type the following:

Connect-VIserver  Servername





Locate the VM that you want to modified using:Get-VM
 






then use the following syntax

 get-vm ServerName | set-vm -MemoryGB 4096 -NumCpu 2 -Notes "H/W modified $(Get-Date)" -confirm:$false



commands:
Get-VM
Set-VM 
parameters:
MemoryMB = Specify the memory size in megabytes (MB
NumCpu     = Specify the number of virtual CPUs.
Notes          =  Provide a description of the virtual machine. The alias of this parameter is Description

Reference:
https://www.vmware.com/support/developer/PowerCLI/PowerCLI51/html/Set-VM.html

Tuesday, December 4, 2012

Best practices for virtual machine snapshots in the VMware environment

  • Snapshots are not backups. As the snapshot file is only a change log of the original virtual disk, do not rely upon it as a direct backup process. The virtual machine is running on the most current snapshot, not the original vmdk disk files.
  • Snapshots are not complete copies of the original vmdk disk files. The change log in the snapshot file combines with the original disk files to make up the current state of the virtual machine. If the base disks are deleted, the snapshot files are useless.
  • Snapshot files can grow to the same size as the original base disk file, which is why the provisioned storage size of a virtual machine increases by an amount equal to the original size of the virtual machine multiplied by the number of snapshots on the virtual machine.
  • The maximum supported amount in a chain is 32. However, VMware recommends that you use only 2-3 snapshots in a chain.
  • Use no single snapshot for more than 24-72 hours. This prevents snapshots from growing so large as to cause issues when deleting/committing them to the original virtual machine disks. Take the snapshot, make the changes to the virtual machine, and delete/commit the snapshot as soon as you have verified the proper working state of the virtual machine.

Monday, November 5, 2012

Configuring additional gateways for vmkernel ports on an ESXi host

To configure a second gateway for the management network:
Open a console to the ESX or ESXi host.

  Run this command:

  • esxcfg-route -a target network  netmask gateway 
For example, to add a route to 192.168.100.0 network through 192.168.0.1
 run one of these command:
  • esxcfg-route -a 192.168.100.0/24 192.168.0.1
  • esxcfg-route -a 192.168.100.0 255.255.255.0 192.168.0.1

The command esxcfg-route -l lists the current routing table. VMware KB article

Tuesday, January 17, 2012

rename ESX host

To rename a VMware ESX host:
*If the ESX host is part of a Cluster, remove it from the cluster.
*If the ESX host is managed by VirtualCenter / vCenter, disconnect and remove the ESX host from the cluster.
*Make the modifications in your DNS environment to reflect the correct name and IP association for the new name.
*Log in as root to the console of ESX host.
*Using a text editor (I prefer nano ) change the name and domain name, if applicable, of the host in these files:


nano /etc/hosts
nano /etc/sysconfig/network


Execute this command where hostname is the new FQDN hostname for the ESX host:

esxcfg-advcfg -s hostname /Misc/HostName

Reboot the ESX host.
Note:
The iSCSI Qualified Name used for iSCSI storage configuration is based on the hostname of the ESX host. If you change the hostname of the ESX host, make sure to review your iSCSI software initiator configuration
Join the ESX host to VirtualCenter / vCenter and clusters

reference:
http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=1010821





Wednesday, January 4, 2012

Windows 2008 R2 Best Practice Analyzer (BPA)

How to install:
BPA is installed by default on all editions of Windows Server 2008 R2 except the Server Core installation option.

How to use BPA:
You can open BPA in the Server Manager console by opening the home page for a server role that supports BPA.
To open BPA in Server Manager
1.Open Server Manager. To open Server Manager, click Start, point to Administrative Tools, and then click Server Manager.

2.In the tree pane, open Roles, and then select the role for which you want to open BPA.

3.In the details pane, open the Summary section, and then open the Best Practices Analyzer area.

ow BPA works


BPA works by measuring a role’s compliance with best practice rules in eight different categories of a role’s effectiveness, trustworthiness, and reliability. Results of measurements can be any of the three severity levels described in the following table.


*Severity level

Description
Noncompliant
Noncompliant results are returned when a role does not satisfy the conditions of a rule.

Compliant
Compliant results are returned when a role satisfies the conditions of a rule.
Warning
Warning results are returned when a role is compliant as operating currently, but may not satisfy the conditions of a rule if changes are not made to its configuration or policy settings.
Reference:
http://technet.microsoft.com/en-us/library/dd759260.aspx