Thursday, November 1, 2012

PowerCLI powershell VMWare Datastore autoload ps1 files profile powershell

Schedule a PowerCLI script as a cronjob or a scheduled task
http://www.virtu-al.net/2009/07/10/running-a-powercli-scheduled-task/


PS1 for Datastore management
  1. http://blogs.vmware.com/vsphere/2012/01/automating-datastore-storage-device-detachment-in-vsphere-5.html
  2. http://vmwaregirl.blogspot.com/2012/03/powercli-get-datastoremountinfo.html
    • List all the SCSI LUN's by the LUNID
    • get-vmhost -state connected | Get-ScsiLun | select-object CapacityMB,RuntimeName,CanonicalName|ft -autosize|findstr "L123

  3. http://snipplr.com/view/48048
  • Create a new VMFS datastore from LUN number (
     New-DatastoreByLun )

Auto Load Powershell script on run.
  1. http://noahcoad.com/post/66/powershell-startup-auto-load-scripts
             set-executionpolicy bypass
       Profile.ps1 under

%UserProfile%\Documents\WindowsPowerShell       Microsoft.PowerShell_profile.ps1 (for basic shell)            
       Microsoft.PowerShellISE_profile.ps1
(for the GUI) 

RDM REPORT - Datastore, RDM, LUN Visibility on Hosts (Node Visibility) output xls
  1. http://www.lucd.info/2010/04/09/lun-report-datastores-rdms-and-node-visibility/

No comments: