Export (0) Print
Expand All

Export-MedvConfiguration

Export-MedvConfiguration

Creates a Registry File (.reg) from a MEDVConfiguration object. All registry data are marked to be set in the HKLM hive.

Syntax

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




Detailed Description

The Export-MedvConfiguration cmdlet writes settings from MedvConfiguration objects to the .Regfile specified via the "Path" parameter. All settings are put in the HKLM hive.

Parameters

-Append

The settings set in the MedvConfiguration object are appended to the specified registry file. It is assumed that the registry file already contains a registry file header if it exists. A new registry file will be created if this parameter is specified and the registry file does not exist.


Aliases

none

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Force

The cmdlet attempts to clear the read-only attribute of the output file if necessary. The cmdlet will attempt 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>

MedvConfiguration object with the settings to be written to the registry file.


Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-NoClobber

Ensures that the cmdlet does not overwrite the contents of an existing file. By default, if a file exists in the specified path, Export-MedvConfiguration overwrites the file without warning unless the append parameter is specified.


Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-PassThru

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

Path to file that will receive the registry settings. The user running the command must have permission to write a file in the location specified by the Path parameter. If a file exists in the specified location and the Append parameter is not specified then the current file will be overwritten.


Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before executing the command.


Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

Describes what would happen if you executed the command without actually executing the command.


Required?

false

Position?

named

Default Value

none

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

Inputs

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

  • Microsoft.Medv.Administration.Commands.MedvConfiguration

    Type: Microsoft.Medv.Administration.Commands.MedvConfiguration
    Description: Object with the MEDV settings to set for a particular scope.


Outputs

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

  • FileInfo

    If -PassThru is specified a FileInfo object will be returned pointing to the REG file created.


Examples

-------------------------- EXAMPLE 1 --------------------------

Description

-----------

Creates a registry file that, when imported to a registry, will disable the start-at-logon feature and set the guest close action to HIBERNATE for the computer.


C:\PS>New-MedvConfiguration -UxLogonStartEnabled true -CloseActionMode HIBERNATE | Export-MedvConfiguration -Path c:\temp\medvsettings.reg

-------------------------- EXAMPLE 2 --------------------------

Description

-----------

Creates a registry file that will set the specified URLs as RedirectUrls in the HKLM hive when the registry file is imported to a registry.


C:\PS>New-MedvConfiguration -RedirectUrls http://webapp1/acme.com,http://webapp2/acme.com | Export-MedvConfiguration -Path c:\temp\redirUrls.reg
Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft