Export (0) Print
Expand All

Export-MedvConfiguration

Export-MedvConfiguration

Exports a MED-V configuration object to a registry file.

Syntax

Parameter Set: Default
Export-MedvConfiguration [-Path] <String> -InputObject <MedvConfiguration> [-Append] [-Force] [-NoClobber] [-PassThru] [-Confirm] [-WhatIf] [ <CommonParameters>]




Detailed Description

The Export-MedvConfiguration cmdlet exports a MedvConfiguration object to a file that has a .reg file name extension. These registry settings changes will be made to the HKLM hive.

Parameters

-Append

Indicates that this cmdlet appends the settings in the MedvConfiguration object to an exsiting registry file. The existing registry file must contain a registry file header. If you specify this parameter but the specified registry file does not exist, the cmdlet creates a new registry file.


Aliases

none

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

Indicates that this cmdlet attempts to clear the read-only attribute of the output file, if necessary. The cmdlet attempts to reset the read-only attribute after the command has run.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InputObject<MedvConfiguration>

Specifies a MedvConfiguration object to export to a registry file.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-NoClobber

Indicates that this cmdlet does not overwrite an existing file. By default, if a file exists in the specified path, this cmdlet overwrites that file without warning.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PassThru

Indicates that this cmdlet returns a FileInfo object for the registry file. By default, this cmdlet does not return any object.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

Specifies the path of a file that receives the registry settings. You must have permission to write in the specified location. If you specify a file that already exists, the cmdlet overwrites that file without warning. To prevent overwriting, specify the NoClobber parameter. To append to an existing file, specify the Append parameter.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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


Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (http://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • Microsoft.Medv.Administration.Commands.MedvConfiguration

    This cmdlet accepts a MedvConfiguration object. A MedvConfiguration object contains MED-V settings to set for a particular scope.


Outputs

The output type is the type of the objects that the cmdlet emits.

  • FileInfo

    This cmdlet genterates FileInfo object.


Examples

Example 1: Export new object to a file

This command uses the New-MedvConfiguration cmdlet to create a MedvConfiguration object, and then passes that object to the current cmdlet by using the pipeline operator. That cmdlet saves the object as a .reg file.


New-MedvConfiguration -UxLogonStartEnabled $True -CloseActionMode HIBERNATE | Export-MedvConfiguration -Path "c:\temp\medvsettings.reg"

Example 2: Export an object that contains redirection URLs

This command creates a MedvConfiguration object that contains redirection URLs for the browser in the guest virtual machine. The command exports the configuration object to a file.


New-MedvConfiguration -RedirectUrls "http://webapp1/contoso.com","http://webapp2/contoso.com" | Export-MedvConfiguration -Path "c:\temp\redirUrls.reg"

Related topics

Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2015 Microsoft