Tasks/events for ESX or VM: PowerCLI script

Hi all

Please can someone suggest a script that copies all the entries in the task/event of a virtual machine or ESX to html or excel sheet and post it. It must be a particular server not all vCenter servers.

Thank you

Try this

$fileName = $env:Temp + '\report.csv' $entity = Get-VM -Name MyVM Get-VIEvent -Entity $entity -MaxSamples 1000 |
Select CreatedTime,UserName,FullFormattedMessage | Export-Csv -Path $fileName -NoTypeInformation -UseCulture
Send-MailMessage -From "[email protected]" -To "[email protected]" `    -Subject "Events" -Attachments $fileName -SmtpServer "mail.lucd.info"

Tags: VMware

Similar Questions

  • during extraction of tasks / events for warehouses of data with powershell

    Hi, I'm looking for the extraction of tasks using powershell events (the same information you will find in using customer vi, inventory home, tabs for data warehouses, tasks, and events) to find the task of 'delete' (for example)

    I would like to use the Get-Vievent command, but I'm unable to use the - entity. Get-datastorename data store

    I think that using the data store object is not possible for the get-vievent command.

    So I use:


    Get-Vievent - MaxSamples 100000 | WHERE-object {$_.} FullFormattedmessage-match 'delete'} | Select Createduserid, username, FullFormattedmessage | Export-csv "c:\export_ds.csv" - noTypeInformation - UseCulture

    It works but it is very slow (my environment is very large)... and I've reached the limit - maxsamples.

    Is there another way? or I have to use - start - stop to limit the number of events, and to several reports by month?

    Thank you very much

    Thierry

    The current version is not it, but it's a good idea.

    I'll update the function.

  • Collection for the PowerCLI scripting requirements

    Someone at - it a good model that helps you organize information, gathering process when you go to the management or to a customer to get for scripts and automation requirements that they want to do?  Y at - it a Web page or a book that puts this kind of thing in a structured methodology or at least one practical how to guide?

    For example, what kinds of questions should I go to make sure that I understand any of my script is supposed to do and help the management or the customer understand what THEY want to do, and get a consensus agreement on the functional requirements for my powerCLI script?

    Your suggestions of entry, welcome masters strategies.

    This question is not really unique for PowerCLI scripting, but all scripts/programs, to write (for yourself or for a customer |).

    And of course, there are always the classic answer "it depends".

    If it is a small task that you write yourself, the requirements are pretty obvious.

    Most of the time, you have the requirements in your head, but it does not have to write in schematic form.

    When you write for a customer, by definition be more formal (I guess).

    An article I like, is the Introduction to gather our creative use cases and requirements published in the Code review.

    Take a look.

  • PowerCLI script to list the df - hl on all ESX hosts?

    Hi Expert,

    I have more than 100 esx host, and I need to list all the df - hl out for my report. Y at - it instead of connect on each esx host to get under output, powercli script that I can use to remove similar information?

    Size of filesystem used Avail use % mounted on

    / dev/sdaa2 20G 1.5 G 17G 8%.

    / dev/CCISS/c0d0p1 1.1 G 118 M 909 M 12% / Boot

    / dev/sdaa6 9.7 G 151 M 9.0 G 2% / Home

    / dev/sdaa7 9.7 G 151 M 9.0 G 2% / tmp

    / dev/sdaa5 9.7 G 317 M 8.9 G 4% / var

    / dev/sdaa8 494M 212 M 257M 46% /vmimages

    Please advice. Thank you

    Are you allowed to enable SSH on servers ESX (i)?

    And are you allowed to establish a SSH session on each ESX (i) Server?

    You have an account and a password on each ESX (i) server that can run the command 'df '?

    If it is Yes, then you can use something like plink.exe in consequence of PuTTY to connect to each ESX (i) server, run the command "df" and retrieve the output.

    There are several available examples to use plink.

    And don't forget that you will need a fingerprint for each server ESX (i) will be stored on the client from which you are running the script.

  • Retrieve the tasks and events for a Virtual Machine

    Hello everyone.

    This question may seem trivial to some people here, but I cannot make it work: I would like to use VCO to retrieve the tasks and events for a specific virtual machine (IN parameter). Can someone help me to do?

    Best regards

    As I said, it must create a collector by using the createCollectorForTasks method in VcTaskManager.

    The parameter of this method is an instance of VcTaskFilterSpec, in which specify you the object to filter (in your case, the reference entity VM)

    You will get a VcTaskHistoryCollector which can only be traversed by using the methods readNextTasks and readPreviousTasks.

    // Get TaskManager service
    var sdktm = vm.sdkConnection.taskManager;
    
    // Create FilterSpec containing vm reference to filter
    var filter = new VcTaskFilterSpec();
    var spec = new VcTaskFilterSpecByEntity();
    spec.entity = vm.reference;
    spec.recursion = VcTaskFilterSpecRecursionOption.self;
    filter.entity = spec;
    
    // Create collector
    var collector = sdktm.createCollectorForTasks(filter);
    collector.resetCollector();
    
    // Browse all pages returned by collector (10 entries per page)
    var taskPage;
    while ((taskPage = collector.readPreviousTasks(10)) != null)
    {
        for each (var task in taskPage)
        {
            System.log("Task: " + task.name + " -> " + task.startTime);
        }
    }
    
  • Need a powercli script to create a new account a local administrator on all ESX and ESXi hosts in the vcenter

    Hi all

    If someone can help me with a powercli script to create a new account a local administrator on all ESX and ESXi hosts in the vcenter, create a role called admin and give all access except the root. This shoulb be past by a virtual centre.

    Very much appreciated to help him.

    Kind regards

    MelLvin

    I suspect that you posted your question to the wrong thread

    This requires only a minor change to the script above actually.

    Something like that

    $groupName = "group"$accountName = "user"$accountPswd = "password"$accountDescription = "A user"
    
    $esxlist = Get-VMHostforeach($esx in $esxlist){    Connect-VIServer -Server $esx -User root -Password "password"
    
        Try {      Get-VMHostAccount -Id $groupName -Group -ErrorAction Stop | Out-Null    }    Catch {      New-VMHostAccount -Id $groupName -GroupAccount | Out-Null    }
    
        $rootFolder = Get-Folder -Name ha-folder-root    Try{        $account = Get-VMHostAccount -Id $accountName -ErrorAction Stop |        Set-VMHostAccount -Password $accountPswd -Description $accountDescription -AssignGroups $groupName    }    Catch{        $account = New-VMHostAccount -Id $accountName -Password $accountPswd -Description $accountDescription -UserAccount -GrantShellAccess -AssignGroups $groupName    }
    
        $rootFolder = Get-Folder -Name ha-folder-root    New-VIPermission -Entity $rootFolder -Principal $account -Role admin
    
        Disconnect-VIServer -Confirm:$false}
    
  • Script - missing and hotfixes installed for ESX and ESXi

    Can I have the script i.e. missing and hotfixes installed for ESX and ESXi using the CLI power only? out put should be csv format

    You reset the content of the table $Results on each iteration of the baseline.

    Try like this

    $Results = @()
    foreach($esx in Get-VMHost) {
      foreach($baseline in (Get-Compliance -Entity $esx -Detailed | where {$_.Status -eq "NotCompliant"})){
        $Results += $baseline.CompliantPatches |    Select @{N="Host";E={$esx.Name}},    @{N="Status";E={"Compliant"}},    @{N="Baseline";E={$baseline.Baseline.Name}},Name,ReleaseDate,IdByVendor,    @{N="KB";E={(Select-String "(?http://[\w|\.|/]*\w{1})" -InputObject $_.Description).Matches[0].Groups['url'].Value}}
    
        $Results += $baseline.NotCompliantPatches |    Select @{N="Host";E={$esx.Name}},    @{N="Status";E={"NotCompliant"}},    @{N="Baseline";E={$baseline.Baseline.Name}},Name,ReleaseDate,IdByVendor,    @{N="KB";E={(Select-String "(?http://[\w|\.|/]*\w{1})" -InputObject $_.Description).Matches[0].Groups['url'].Value}}
      }
    }
    $Results
    

    It will give the installed and lack of patches which are defined in the non-compliant baslines related to the ESXi host.

    If you want to see all the lines, also the most consistent, omit the Where clause on the base line (foreach) loop.

  • GUI for the PowerCLI scripting

    Someone knows a software or tool that generate the GUI for the PowerCLI scripting?

    There are a few, Sapien is free and it's called PrimalForms Community Edition.

  • PowerCli script prompts for user input

    Hello

    Below powercli script prompt for user input. Don't know how to fix it. I don't want it calls for the release of the user, as I am the code as part of the largest script runinng. How can I run in silent mode? Any help would be very happy.

    function VMHostDiskDetails {}

    $DateVar = get-date - uformat "% Y-%m-%d_%I.%M.%S.%p".

    $VMHosts = get-VMHost # get all the VM host

    $Datastores = $VMHosts | Get-Datastore # get the info from the data store for all VMHosts

    $VMHostStorage = $VMHosts | ForEach-Object {#Then, for each VMHosts, download the VMHostName

    $VMHost = $_. Name

    $_ | Get-VMHostStorage | Select-Object - expandProperty FileSystemVolumeInfo | `

    {ForEach-Object

    $VMHostStorageName = $_. Name

    Add-Member - InputObject $_ - MemberType NoteProperty-name FreeSpaceMB-value ($Datastores |) Where-Object {$_.} Name - eq $VMHostStorageName}). FreeSpaceMB - PassThru | `

    Add-Member - MemberType NoteProperty-Name HostName-value $VMHost - PassThru

    Add-Member - MemberType NoteProperty-name TimeStamp-value $DateVar

    }

    }

    $VMHostStorage | Select the host name, name, mode, Type, capacity, FreeSpaceMB, path, TimeStamp | Export-Csv VMHostStorage.csv - notype

    }

    VMHostDiskDetails

    Thank you

    M

    The 2nd line Add-Member does not have the object on the pipeline.

    The 3rd line Add-Member had a parameter - PassThru.

    function VMHostDiskDetails {
    
         $DateVar = get-date -uformat "%Y-%m-%d_%I.%M.%S.%p"
    
         $VMHosts = Get-VMHost mmmstv004* # Get all the VM-Hosts
         $Datastores = $VMHosts | Get-Datastore # Get the Datastore info for all the VMHosts
    
         $VMHostStorage = $VMHosts | ForEach-Object { #Then, for each VMHosts, get the VMHostName
              $VMHost = $_.Name
    
              $_ | Get-VMHostStorage | Select-Object -expandProperty FileSystemVolumeInfo | `
    
              ForEach-Object {
                   $VMHostStorageName = $_.Name
                   Add-Member -InputObject $_ -MemberType NoteProperty -Name FreeSpaceMB -Value ($Datastores | Where-Object {$_.Name -eq $VMHostStorageName}).FreeSpaceMB -PassThru | `
                   Add-Member -MemberType NoteProperty -Name HostName -Value $VMHost -PassThru | `
                   Add-Member -MemberType NoteProperty -Name TimeStamp -Value $DateVar -PassThru
    
              }
         }
    
         $VMHostStorage | Select HostName,Name,AccessMode,Type,Capacity,FreeSpaceMB, Path, TimeStamp | Export-Csv VMHostStorage.csv -notype
    }
    
    VMHostDiskDetails
    

    ____________

    Blog: LucD notes

    Twitter: lucd22

  • Save the CDP to HTML for Mulitple VMHosts via PowerCLI

    Hello

    I tried some of the existing scripts found here to collect information network switch port CDP natachasery on ESXi hosts.  These scripts assume that a host is queried or they connect to a server vCenter Server to collect a VMHost list.  When I try to connect to multiple ESXi hosts, that I will meet this error:

    The method call failed because [System.Object []] contains a method named "QueryNetworkHint".

    Can a PowerCLI script perform the next task?

    I wish that the script first to connect to multiple ESXi hosts that are not managed in vCenter.  The default Mode of the Get-PowerCLIConfiguration server has Multiple value so that "Get-VMHost" returns a list of the VMHosts.

    The script would then collect information from each bear on each host and export the results to the format of HTML table as shown in the example attached .htm.  I hope help with the section which gathers information for multiple ESXi hosts.

    # Begin script

    SE connect-VIServer esx1-user user1-password password1

    SE connect-VIServer esx2-user user1-password password1

    SE connect-VIServer esx3-user user1-password password1

    $filename = 'C:\ www\cdp_example.htm.

    ???

    # Example of data

    $report = @)
    $row = "" | Select VMHost, vSwitch, physNIC, PortID, VLANID, speed, Devanlay, MAC

    $row. VMHost = "esx1.example.com."

    $row.vSwitch = 'vSwitch0.

    $row.physNIC = "vmnic0".
    $row. DFR = "switch1.example.com."
    $row. PortID = "GigabitEthernet3/5.

    $row. VLANID = "101".

    $row. Speed = "1000".
    $row. MAC = "00: 0C: a3:4 b: ff: 01»

    $report += $row

    $report | ConvertTo-Html-title "ESXi CDP Info | Out-file $filename

    --

    Sample HTML table output.

    VMHost vSwitch physNIC DevID PortID VLANID Speed Double-sided MAC
    Esx1.example.comvSwitch0vmnic0Switch1.example.comGigabitEthernet2/41011000Full00: 0C: a3:4 b: ff: 01
    Esx1.example.comvSwitch0vmnic1SWITCH2.example.comGigabitEthernet3/51011000Full00: 0C: a3:4 b: ff: 02
    ESX2.example.comvSwitch0vmnic0Switch1.example.comGigabitEthernet3/51011000Full00: 0C: a3:4 b: ff: 03
    ESX2.example.comvSwitch0vmnic1SWITCH2.example.comGigabitEthernet3/51011000Full00: 0C: a3:4 b: ff: 04

    --

    Thank you!

    Try to change this line

    $netSys = get-view $esx.ConfigManager.NetworkSystem

    in this

    $netSys = get-view $esx.ConfigManager.NetworkSystem - Server $esx

  • PowerCLI Script to the report on the failed VM jobs

    I figured out how to report on the events of VM (get-vievent), but no has no stains of VM. If a snapshot of the virtual computer fails, sometimes it never connect the events of the VM, but lists an error on the display of tasks. We are trying to monitor the clichés failed since its part of our backup solution.

    I was looking for a way to report these tasks/failure of events in a daily report, or simply add to the daily report of amazing Alan Renouf that we use.

    does anyone have any suggestions? For an example, see the attached screenshots. See how, in the view tasks, you have mistakes, but in the view of events, there is no errors.

    Any help would be great. Thank you!

    Jeff

    PowerCLI Script to the report on the failed VM jobs

    I figured out how to report on the events of VM (get-vievent), but no has no stains of VM. If a snapshot of the virtual computer fails, sometimes it never connect the events of the VM, but lists an error on the display of tasks. We are trying to monitor the clichés failed since its part of our backup solution.

    I was looking for a way to report these tasks/failure of events in a daily report, or simply add to the daily report of amazing Alan Renouf that we use.

    does anyone have any suggestions? For an example, see the attached screenshots. See how, in the view tasks, you have mistakes, but in the view of events, there is no errors.

    Any help would be great. Thank you!

    Jeff

    Hi Jeff

    I had exactly the same need to identify stereotypes having failed and drilled until SDK and LucD suggestions (thank you) to encode the following lines:

    $vmlist = Get-VM |sort Name
    
    foreach ($guestname in $vmlist)
    {
        $hours = 48 # Number of hours back
          $tasknumber = 999          # Windowsize of the Task collector
    $taskMgr = Get-View TaskManager
    
    # Create hash table. Each entry is a create snapshot task
    $report = @{}
    
    $filter = New-Object VMware.Vim.TaskFilterSpec
    $filter.Time = New-Object VMware.Vim.TaskFilterSpecByTime
    $filter.Time.beginTime = (Get-Date).AddHours(-$hours)
    $filter.Time.timeType = "startedTime"
    
    $collectionImpl = Get-View ($taskMgr.CreateCollectorForTasks($filter))
    
    $dummy = $collectionImpl.RewindCollector
    $collection = $collectionImpl.ReadNextTasks($tasknumber)
    while($collection -ne $null){
    $collection | where {$_.DescriptionId -eq "VirtualMachine.createSnapshot" -and $_.EntityName -eq $guestName} | %{
    if ($_.State -eq "Error") {
            write-host $_.EntityName
            write-host $_.StartTime
            write-host $_.State
            }
        else {
        }
    }
    $collection = $collectionImpl.ReadNextTasks($tasknumber)
    }
    $collectionImpl.DestroyCollector()
    
     }  
    

    This script displays the name of the virtual machines which met with an instant failure in the last 48 hours (a variable, you can change)

    This is just the beginning, because I want to count the shots failed and identify virtual computers that have more than 2 in 2 days

    Feel free to alter it at will.

    Enjoy

    Eric

  • count the number of targets, devices and paths by hba for each host with powercli 5.5

    Hi all

    I'm writing this Question again in the community, was not able to found the answer I was looking for in the nets:

    https://communities.VMware.com/thread/516226?start=0 & tstart = 0

    https://communities.VMware.com/thread/293531

    I went through the scripts provided in the community, but seems that t not work on powercli 5.5.

    ///

    # The target account, devices and paths for each host

    Get-Cluster $cluster | Get-VMHost | Sort-Object-property name. {ForEach-Object

    $VMHost = $_

    $VMHost | Get-VMHostHba-type FibreChannel | Sort-Object-property device | {ForEach-Object

    $VMHostHba = $_

    $ScsiLun = $VMHostHba | Get-ScsiLun

    If {($ScsiLun)

    $ScsiLunPath = $ScsiLun | Get-ScsiLunPath | `

    Where-Object {$_.} Name - like "$($VMHostHba.Device) *"} ".

    $Targets = ($ScsiLunPath |) »

    Group-object - property SanID | Measure - Object). County

    $Devices = ($ScsiLun |) Measure - Object). County

    $Paths = ($ScsiLunPath |) Measure - Object). County

    }

    Else {}

    $Targets = 0

    $Devices = 0

    $Paths = 0

    }

    $Report = "" | Select-Object - property VMHost, HBA, target devices, paths

    $Report.VMHost = $VMHost.Name

    $Report.HBA = $VMHostHba.Device

    $Report.Targets = $Targets

    $Report.Devices = $Devices

    $Report.Paths = $Paths

    $Report

    }

    }

    ///

    I went through the script LucD posted below: but it's not exactly what I'm looking for.

    LucD : can you please change the same for me please.   to count the number of paths per hba for each host with powercli 5.5, devices and targets.

    //

    $esx = get-VMHost < host name >

    foreach ($hba to (VMHostHba Get - VMHost $esx - type "FibreChannel")) {}

    $target = ((get - see $hba. VMhost). Config.StorageDevice.ScsiTopology.Adapter | where {$_.} Adapter - eq $hba. Key}). Goal

    $luns = get-ScsiLun - Hba $hba - LunType 'disk '.

    $nrPaths = ($target | % {$_.}) Lun.Count} | Measure - Object - sum). Sum

    Write-Host $hba. Device ' target: ' $target. County "devices:" $luns. County ' path: ' $nrPaths

    }

    //

    I'll be grateful for any help.

    Tarun Gupta

    Try something like this

    {foreach ($esx in Get-VMHost)

    foreach ($hba to (VMHostHba Get - VMHost $esx - type "FibreChannel")) {}

    $target = ((get - see $hba. VMhost). Config.StorageDevice.ScsiTopology.Adapter | where {$_.} Adapter - eq $hba. Key}). Goal

    $luns = get-ScsiLun - Hba $hba - LunType "disk" - ErrorAction SilentlyContinue

    $nrPaths = ($target | % {$_.}) Lun.Count} | Measure - Object - sum). Sum

    $props [ordered] = @ {}

    VMHost = $esx.name

    HBA = $hba. Name

    Target = $target. County

    Device = $luns. County

    Path = $nrPaths

    }

    New-object PSObject-property $props

    }

    }

  • PowerCLI script to display the number of vCPU by VMhost use

    Hi all

    I'm looking to get help here with powerCLI script to list each total number of ESXi vCPU host that is used to determine if there are any ESXi host CPU is more engaged.

    According to suggestion of performance in some blog vExpert, is around 1: 3 of Jepp core ratio: vCPU allocated, then how to display the report with the powerCLI for something like this:

    PRODESXi01
    Total of nuclei available: 32
    Used by the virtual machine: 28

    PRODESXi02
    Total of nuclei available: 32
    Used by the virtual machine: 38

    So according to the result above, the PRODESXi02 is more committed by 6vCPU allocated to the virtual machine.

    Note: The available total carrots is taken from the value of logical processors from the contents tab, when you click on the vSphere console.

    How to get this report using PowerCLI?

    Thank you

    You mean something like this?

    {Foreach ($esx in Get-VMHost)

    $vCPU = get-VM-location $esx | Measure-object-property NumCpu-sum | Select - ExpandProperty sum

    $esx | Select Name,@{N='pCPU'; E={$_. NumCpu}},

    @{N = 'vCPU'; E = {$vCPU}},

    @{N = "Ratio"; E = {[math]: Round ($vCPU / $_.)} (NumCpu, 1)}}

    }

  • Can write us "PowerCLI Script" to get the details of card RAID HP (Firmware &amp; Driver)?

    Can write us "PowerCLI Script" to get the details of card RAID HP (Firmware & Driver)

    For example: native ESX command below shows desired output for me.

    But we needed equality PowerCLI ESX command below script

    # cat/proc/driver/cciss/cciss0

    cciss0: HP Smart Array P400i controller

    Board ID: 0x3235103c

    Firmware version: 7.22# cat/proc/driver/hpsa/hpsa0

    hpsa0: HP Smart Array P410i controller

    Board ID: 0x3245103c

    Firmware version: 5,70

    Driver version: HP HPSA driver (v 5.0.0 - 17vmw)

    The extracted following PowerCLI you will get server and type of controller, firmware version and the hpsa/Smart Storage Array controllers driver version based of:

    Get-VMhost | Sort | Select Name, Model,@{N='Controller Type'; E={(Get-VMHostHba -VMHost $_ | ? {$_.Model -imatch '.*(hpsa|smart).*'}).Model}},@{N='Controller Firmware'; E={($_.ExtensionData.Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo | ? {$_.Name -like '*hpsa*firmware*'}).Name}},@{N='hpsa Driver Version'; E={($_.ExtensionData.Runtime.HealthSystemRuntime.SystemHealthInfo.NumericSensorInfo | ? {$_.Name -like '*scsi-hpsa*'}).Name}} | Format-Table -Autosize
    

    The sample output:

    
    Name                     Model                Controller Type   Controller Firmware                           hpsa Driver Version----                     -----                ---------------   -------------------                           -------------------esxihost1022.local    ProLiant DL380 G6    Smart Array P410i    HP Smart Array Controller HPSA1 Firmware 6.40    Hewlett-Packard scsi-hpsa 5.0.0.60-1OEM.500.0.0.472560 2014-05-15 15:32:23.000esxihost1023.local    ProLiant DL380 G6    Smart Array P410i    HP Smart Array Controller HPSA1 Firmware 6.40    Hewlett-Packard scsi-hpsa 5.0.0.60-1OEM.500.0.0.472560 2014-05-15 15:32:23.000esxihost1024.local    ProLiant DL380 G6    Smart Array P410i    HP Smart Array Controller HPSA1 Firmware 6.40    Hewlett-Packard scsi-hpsa 5.0.0.60-1OEM.500.0.0.472560 2014-05-15 15:32:23.000esxihost1033.local    ProLiant DL360p Gen8    Smart Array P420i    HP Smart Array Controller HPSA1 Firmware 5.42    Hewlett-Packard scsi-hpsa 5.0.0.60-1OEM.500.0.0.472560 2014-05-15 15:32:23.000esxihost1034.local    ProLiant DL360p Gen8    Smart Array P420i    HP Smart Array Controller HPSA1 Firmware 5.42    Hewlett-Packard scsi-hpsa 5.0.0.60-1OEM.500.0.0.472560 2014-05-15 15:32:23.000esxihost1041.local    ProLiant DL380 G5    Smart Array P400    HP Smart Array Controller HPSA1 Firmware 7.24    VMware scsi-hpsa 5.0.0-17vmw.500.0.0.469512 2011-08-19 01:58:59.000esxihost1042.local    ProLiant DL380 G5    Smart Array P400    HP Smart Array Controller HPSA1 Firmware 7.24    VMware scsi-hpsa 5.0.0-17vmw.500.0.0.469512 2011-08-19 01:58:59.000esxihost1160.local    ProLiant BL460c Gen8    Smart Array P220i    HP Smart Array Controller HPSA1 Firmware 5.22    Hewlett-Packard scsi-hpsa 5.0.0-40OEM.500.0.0.472560 2012-08-24 21:04:51.000esxihost1161.local    ProLiant BL460c Gen8    Smart Array P220i    HP Smart Array Controller HPSA1 Firmware 5.22    Hewlett-Packard scsi-hpsa 5.0.0-40OEM.500.0.0.472560 2012-08-24 21:04:51.000
    
  • Create jobs that runs a powercli script every day at 20:00

    Hi all

    I'm looking for a way to add a powercli script to cron or schduler so that it runs every day at 20:00 say... I found average windows wrt link below

    http://social.msdn.Microsoft.com/forums/SharePoint/en-us/e63d0776-b4aa-4ab6-885c-a41fd0c83a7c/create-job-that-runs-a-PowerShell-script-every-day?Forum=sharepointgeneralprevious

    Is there better way that this can be done for powercli as well?

    Thank you

    AFAIK, except if you have a few programming specifialised run SW, Windows Scheduler did a good job.

    BTW, Alan has also made a post on this, see running a scheduled task PowerCLI

Maybe you are looking for