Question

I read about the Web Deploy Powershell Cmdlets, and I'd like to start using them. Of course, the first task as I begin is to backup the current configuration state of my test webserver--and this cmdlet should do it:

Backup-WDServer -ConfigOnly

But, when I run it I get this complaint--I'm unsure how to resolve it:

Backup-WDServer : The property 'password' located at '/webServer/appHostConfig[@path='']/location[@path='']/section[@name='system.applicationHost/applicationPools']/applicationPools/applicationPoolDefaults/processModel' is 
marked as secure. You must specify an encryption password to archive this property.
At line:1 char:1
+ Backup-WDServer -ConfigOnly
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : InvalidOperation: (:) [Backup-WDServer], DeploymentEncryptionException
    + FullyQualifiedErrorId : Microsoft.Web.Deployment.PowerShell.BackupServer
Was it helpful?

Solution

I had trouble finding documentation, but after spending time with IL DASM, reading more in the link provided in the question, and experimenting, I found this works:

Backup-WDServer -SourceSettings @{encryptPassword='password'} -ConfigOnly

If anyone has a link to more complete documentation I'd appreciate it--but Bing and Google didn't find much.

OTHER TIPS

It is an old thread however there is the answer:

Restore-WDServer -DestinationSettings @{encryptPassword='password'} -Package /path/to/the/zip/file

How do you set encryptpassword for the Restore-WDServer? if you did this to backup

Backup-WDServer -SourceSettings @{encryptPassword='password'} -ConfigOnly

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top