PowerCLI Exclude List of VM's From Script Deleting Snapshots in VMware

Поделиться
HTML-код
  • Опубликовано: 20 авг 2024
  • In This video you will be able to learn how to get snapshot list older than some specific days and then delete snapshot on all the machine but still exclude some VM's so script will not delete the snapshot on excluded VM's.
    Everything is explained in the video you can easily learn. If you like the video do Like Share Subscribe.
    =======================
    $Credential = Get-Credential -Message "Enter Login Credential"
    $vCenter = Read-Host -Prompt "Enter vCenter Name"
    Connect-VIServer -Server $vCenter -Credential $Credential
    $DaysOLD = Read-Host "Enter days count to get OLDER Snapshot"
    $vmsToIgnore = gc C:\Scripts\IgnoreVM.txt
    Get-VM | ForEach-Object {
    if ($vmsToIgnore -contains $_.Name){
    write-host $_ Server found in ignore list
    }else{
    Get-Snapshot $_ | Where {$_.Created -lt (Get-Date).AddDays(-$DaysOLD)} | Select-Object vm, VmId, Name, Description, SizeGB, Created | ft -AutoSize
    ##Get-Snapshot $_ | Where {$_.Created -lt (Get-Date).AddDays(-$DaysOLD)} | Remove-Snapshot -Confirm:$false
    }
    }
    =======================
    PowerCLI Power On a Suspended VMware Virtual Machine
    • PowerCLI Power On a Su...
    PowerShell Installing software remotely on Multiple Computers
    • PowerShell Installing ...
    PowerShell Send Email if Windows Service is in Stopped State
    • PowerShell Send Email ...
    PowerShell Send email if windows service is not running
    • PowerShell Send email ...
    Get Local Group Members From Remote computers
    • Get Local Group Member...
    Powershell Script To Change Service Account or Update Password
    • Powershell Script To C...
    Powershell How To Change Remote Computer (Workgroup) Local Account Password
    • Powershell How To Chan...
    Delete Virtual Machine Snapshots Older Than Specific Days
    • Delete Multiple Virtua...
    How To Create File Selection Dialog Box in PowerShell
    • How To Create File Sel...
    Add User/Group To The Local Administrators/RDP Group On Multiple Computers
    • Add User/Group To The ...
    Get Windows Updates list from Remote Computer
    • Get Windows Updates li...
    PowerShell Remotely Uninstall Software from Multiple Computers
    • PowerShell Remotely Un...
    PowerShell Search Specific KB Status on Remote Computers
    • PowerShell Search Inst...
    PowerShell Script to Connect Multiple Server's Remote Session
    • PowerShell Script to C...
    PowerCLI Script to power ON dedicated VMs listed in a text file
    • PowerCLI Script to pow...
    PowerCLI Script to power Off dedicated VMs listed in a text file
    • PowerCLI Script to pow...
    Delete Snapshot's from Multiple Virtual Machines
    • Delete Snapshot's from...
    Create Snapshot on Multiple Virtual Machine
    • Create Snapshot on Mul...
    How can I check if a port is open remotely
    • Identify if Windows TC...
    Installing software remotely on Multiple "Workgroup" Computers
    • Installing software re...
    PowerShell Installing software remotely on Multiple Computers
    • PowerShell Installing ...
    Unable to move OU in Active Directory (Access is denied)
    • Unable to move OU in A...
    PowerShell Installing software remotely on Multiple Computers
    • PowerShell Installing ...
    Get Multiple Services Status Remotely | Remotely Start or Stop Services
    • Get Multiple Services ...
    Get Date and Time from Multiple Remote Computers
    • Get Date and Time from...
    PowerCLI - How to get HA restarted VM's List
    • PowerCLI - How to get ...
    Get-Childitem - Search file on Local and Remote Computers
    • Get-Childitem - Search...
    Remotely Create Update Delete Registry Key on Multiple Computers
    • Remotely Create Update...
    Get service status from remote server's using PowerShell
    • Get service status fro...

Комментарии • 5

  • @syedfarooq3208
    @syedfarooq3208 Год назад

    Thanks for making video

  • @bkbalakrishna5528
    @bkbalakrishna5528 Год назад +1

    Please create a power shell script to update Anotation deatils in the vmware vcenter

    • @SwapnilInfotech
      @SwapnilInfotech  Год назад

      Sure, Can you elaborate on your requirements here. Based on the requirements I'll try to help.

  • @syedfarooq3208
    @syedfarooq3208 Год назад

    How to schedule the script in power shell and it should be run very day automatically.