Rubrik SDK for PowerShell
master
master
  • README
  • User Documentation
    • Contribution
    • FAQ
    • Getting Started
    • Installation
    • Licensing
    • Project Architecture
    • Requirements
    • Support
  • Command Documentation
    • Workflow
      • Flow Audit
    • Reference
      • Connect-Rubrik
      • Disconnect-Rubrik
      • Export-RubrikDatabase
      • Export-RubrikReport
      • Export-RubrikVApp
      • Export-RubrikVCDTemplate
      • Export-RubrikVM
      • Find-RubrikFile
      • Get-RubrikAPIToken
      • Get-RubrikAPIVersion
      • Get-RubrikArchive
      • Get-RubrikAvailabilityGroup
      • Get-RubrikBackupServiceDeployment
      • Get-RubrikBlackout
      • Get-RubrikBootStrap
      • Get-RubrikClusterInfo
      • Get-RubrikClusterNetworkInterface
      • Get-RubrikClusterStorage
      • Get-RubrikClusterUpgradeHistory
      • Get-RubrikDatabase
      • Get-RubrikDatabaseDownloadLink
      • Get-RubrikDatabaseFiles
      • Get-RubrikDatabaseMount
      • Get-RubrikDatabaseRecoverableRange
      • Get-RubrikDatabaseRecoveryPoint
      • Get-RubrikDebugInfo
      • Get-RubrikDNSSetting
      • Get-RubrikDownloadLink
      • Get-RubrikEmailSetting
      • Get-RubrikEvent
      • Get-RubrikEventSeries
      • Get-RubrikFileset
      • Get-RubrikFilesetTemplate
      • Get-RubrikGuestOSCredential
      • Get-RubrikHost
      • Get-RubrikHostVolume
      • Get-RubrikHvmFormatAutoUpgrade
      • Get-RubrikHvmFormatClusterStorage
      • Get-RubrikHvmFormatReport
      • Get-RubrikHvmFormatUpgradeReport
      • Get-RubrikHyperVHost
      • Get-RubrikHyperVMount
      • Get-RubrikHyperVVM
      • Get-RubrikIPMI
      • Get-RubrikLDAP
      • Get-RubrikLoginBanner
      • Get-RubrikLogShipping
      • Get-RubrikManagedVolume
      • Get-RubrikManagedVolumeExport
      • Get-RubrikModuleDefaultParameter
      • Get-RubrikModuleOption
      • Get-RubrikMount
      • Get-RubrikNASShare
      • Get-RubrikNetworkThrottle
      • Get-RubrikNfsArchive
      • Get-RubrikNode
      • Get-RubrikNotificationSetting
      • Get-RubrikNTPServer
      • Get-RubrikNutanixCluster
      • Get-RubrikNutanixVM
      • Get-RubrikObject
      • Get-RubrikObjectStoreArchive
      • Get-RubrikOracleDB
      • Get-RubrikOrganization
      • Get-RubrikOrgAuthorization
      • Get-RubrikProxySetting
      • Get-RubrikQstarArchive
      • Get-RubrikReplicationSource
      • Get-RubrikReplicationTarget
      • Get-RubrikReport
      • Get-RubrikReportData
      • Get-RubrikRequest
      • Get-RubrikScvmm
      • Get-RubrikSecurityClassification
      • Get-RubrikSetting
      • Get-RubrikSLA
      • Get-RubrikSmbDomain
      • Get-RubrikSmbSecurity
      • Get-RubrikSnapshot
      • Get-RubrikSNMPSetting
      • Get-RubrikSoftwareVersion
      • Get-RubrikSQLInstance
      • Get-RubrikSupportTunnel
      • Get-RubrikSyslogServer
      • Get-RubrikUnmanagedObject
      • Get-RubrikUser
      • Get-RubrikUserRole
      • Get-RubrikVApp
      • Get-RubrikVAppExportOption
      • Get-RubrikVAppRecoverOption
      • Get-RubrikVAppSnapshot
      • Get-RubrikVCD
      • Get-RubrikVCDTemplateExportOption
      • Get-RubrikVCenter
      • Get-RubrikVersion
      • Get-RubrikVgfAutoUpgrade
      • Get-RubrikVgfClusterStorage
      • Get-RubrikVgfReport
      • Get-RubrikVgfUpgradeReport
      • Get-RubrikVM
      • Get-RubrikVMSnapshot
      • Get-RubrikVMwareCluster
      • Get-RubrikVMwareDatacenter
      • Get-RubrikVMwareDatastore
      • Get-RubrikVMwareHost
      • Get-RubrikVolumeGroup
      • Get-RubrikVolumeGroupMount
      • Invoke-RubrikGraphQLCall
      • Invoke-RubrikHvmFormatUpgrade
      • Invoke-RubrikRESTCall
      • Invoke-RubrikVgfUpgrade
      • Move-RubrikMountVMDK
      • New-RubrikAPIToken
      • New-RubrikBootStrap
      • New-RubrikDatabaseMount
      • New-RubrikFileset
      • New-RubrikFilesetTemplate
      • New-RubrikHost
      • New-RubrikHyperVVMMount
      • New-RubrikLDAP
      • New-RubrikLogBackup
      • New-RubrikLogShipping
      • New-RubrikManagedVolume
      • New-RubrikManagedVolumeExport
      • New-RubrikMount
      • New-RubrikNASShare
      • New-RubrikOrganization
      • New-RubrikReport
      • New-RubrikSLA
      • New-RubrikSnapshot
      • New-RubrikUser
      • New-RubrikVCenter
      • New-RubrikVMDKMount
      • New-RubrikVolumeGroupMount
      • Protect-RubrikDatabase
      • Protect-RubrikFileset
      • Protect-RubrikHyperVVM
      • Protect-RubrikNutanixVM
      • Protect-RubrikTag
      • Protect-RubrikVApp
      • Protect-RubrikVM
      • Protect-RubrikVolumeGroup
      • Register-RubrikBackupService
      • Remove-RubrikAPIToken
      • Remove-RubrikDatabaseMount
      • Remove-RubrikDatabaseSnapshots
      • Remove-RubrikFileset
      • Remove-RubrikFilesetSnapshot
      • Remove-RubrikFilesetTemplate
      • Remove-RubrikHost
      • Remove-RubrikHyperVMount
      • Remove-RubrikHyperVSnapshot
      • Remove-RubrikLogShipping
      • Remove-RubrikManagedVolume
      • Remove-RubrikManagedVolumeExport
      • Remove-RubrikManagedVolumeSnapshot
      • Remove-RubrikModuleDefaultParameter
      • Remove-RubrikMount
      • Remove-RubrikNASShare
      • Remove-RubrikNutanixVMSnapshot
      • Remove-RubrikOrganization
      • Remove-RubrikOrgAuthorization
      • Remove-RubrikProxySetting
      • Remove-RubrikReport
      • Remove-RubrikSLA
      • Remove-RubrikUnmanagedObject
      • Remove-RubrikUser
      • Remove-RubrikVCenter
      • Remove-RubrikVMSnapshot
      • Remove-RubrikVolumeGroupMount
      • Remove-RubrikVolumeGroupSnapshot
      • Reset-RubrikLogShipping
      • Restore-RubrikDatabase
      • Restore-RubrikVApp
      • Resume-RubrikSLA
      • Set-RubrikAvailabilityGroup
      • Set-RubrikBlackout
      • Set-RubrikDatabase
      • Set-RubrikHvmFormatAutoUpgrade
      • Set-RubrikHyperVVM
      • Set-RubrikLogShipping
      • Set-RubrikManagedVolume
      • Set-RubrikModuleDefaultParameter
      • Set-RubrikModuleOption
      • Set-RubrikMount
      • Set-RubrikNASShare
      • Set-RubrikNutanixVM
      • Set-RubrikOrgAuthorization
      • Set-RubrikProxySetting
      • Set-RubrikReport
      • Set-RubrikSetting
      • Set-RubrikSLA
      • Set-RubrikSQLInstance
      • Set-RubrikSupportTunnel
      • Set-RubrikUser
      • Set-RubrikUserRole
      • Set-RubrikVCD
      • Set-RubrikVCenter
      • Set-RubrikVgfAutoUpgrade
      • Set-RubrikVM
      • Set-RubrikVolumeFilterDriver
      • Start-RubrikDownload
      • Start-RubrikManagedVolumeSnapshot
      • Stop-RubrikManagedVolumeSnapshot
      • Suspend-RubrikSLA
      • Sync-RubrikAnnotation
      • Sync-RubrikTag
      • Test-RubrikSnapshotVerification
      • Update-RubrikHost
      • Update-RubrikNutanixCluster
      • Update-RubrikVCD
      • Update-RubrikVCenter
      • Update-RubrikVMwareVM
Powered by GitBook
On this page
  • SYNOPSIS
  • SYNTAX
  • DESCRIPTION
  • EXAMPLES
  • EXAMPLE 1
  • EXAMPLE 2
  • PARAMETERS
  • -id
  • -DatastoreId
  • -HostID
  • -VMName
  • -DisableNetwork
  • -RemoveNetworkDevices
  • -KeepMACAddresses
  • -UnregisterVM
  • -PowerOn
  • -RecoverTags
  • -Server
  • -api
  • -WhatIf
  • -Confirm
  • CommonParameters
  • INPUTS
  • OUTPUTS
  • NOTES
  • RELATED LINKS

Was this helpful?

  1. Command Documentation
  2. Reference

Export-RubrikVM

SYNOPSIS

Exports a given snapshot for a VMware VM

SYNTAX

Export-RubrikVM [-id] <String> [-DatastoreId] <String> [-HostID] <String> [[-VMName] <String>]
 [-DisableNetwork] [-RemoveNetworkDevices] [-KeepMACAddresses] [-UnregisterVM] [-PowerOn] [-RecoverTags]
 [[-Server] <String>] [[-api] <String>] [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

The Export-RubrikVM cmdlet is used to restore a snapshot from a protected VM, copying all data to a given datastore and running the VM in an existing vSphere environment.

EXAMPLES

EXAMPLE 1

Export-RubrikVM -id '7acdf6cd-2c9f-4661-bd29-b67d86ace70b' -HostId (Get-RubrikVMwareHost -name esxi01 -PrimaryClusterID local).id -DatastoreId (Get-RubrikVMwareDatastore -name vSAN).id

This will mount the snapshot with an id of 7acdf6cd-2c9f-4661-bd29-b67d86ace70b to the specified host and datastore

EXAMPLE 2

Get-RubrikVM 'server01' -PrimaryClusterID local | Get-RubrikSnapshot | Sort-Object -Property Date -Descending | Select -First 1 | Export-RubrikVM -HostId (Get-RubrikVMwareHost -name esxi01 -PrimaryClusterID local).id -DatastoreId (Get-RubrikVMwareDatastore -name vSAN).id

This will retreive the latest snapshot from the given VM 'server01' and export to the specified host and datastore.

PARAMETERS

-id

Rubrik id of the snapshot to export

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 1
Default value: None
Accept pipeline input: True (ByPropertyName)
Accept wildcard characters: False

-DatastoreId

Rubrik id of the vSphere datastore to store exported VM. (Use "Invoke-RubrikRESTCall -Endpoint 'vmware/datastore' -Method 'GET' -api 'internal'" to retrieve a list of available VMware datastores)

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-HostID

ID of host for the export to use (Use "Invoke-RubrikRESTCall -Endpoint 'vmware/host' -Method 'GET' -api '1'" to retrieve a list of available VMware hosts.)

Type: String
Parameter Sets: (All)
Aliases:

Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-VMName

Name of the exported VM

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-DisableNetwork

Whether the network should be disabled upon restoration. This should be set true to avoid ip conflict if source VM still exists.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-RemoveNetworkDevices

Whether to remove network interfaces from the restored virtual machine. Default is false.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-KeepMACAddresses

Whether to assign MAC addresses from source virtual machine to exported virtual machine. Default is false.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-UnregisterVM

Whether the newly restored virtual machine is unregistered from vCenter. Default is false.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-PowerOn

Whether the VM should be powered on after restoration. Default is true.

Type: SwitchParameter
Parameter Sets: (All)
Aliases:

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-RecoverTags

Whether to recover vSphere tags

Type: SwitchParameter
Parameter Sets: (All)
Aliases: shouldRecoverTags

Required: False
Position: Named
Default value: False
Accept pipeline input: False
Accept wildcard characters: False

-Server

Rubrik server IP or FQDN

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 5
Default value: $global:RubrikConnection.server
Accept pipeline input: False
Accept wildcard characters: False

-api

API version

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 6
Default value: $global:RubrikConnection.api
Accept pipeline input: False
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

INPUTS

OUTPUTS

NOTES

Written by Mike Preston for community usage Twitter: @mwpreston GitHub: mwpreston

RELATED LINKS

PreviousExport-RubrikVCDTemplateNextFind-RubrikFile

Last updated 4 years ago

Was this helpful?

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see .

about_CommonParameters
https://rubrik.gitbook.io/rubrik-sdk-for-powershell/command-documentation/reference/export-rubrikvm