I am trying to backup IIS6 with PowerShell, I have found the method I am after in WMI's
IISComputer.BackupWithPassword however when I try to execute it with the following PowerShell:
$IISComputer = Get-WmiObject -Namespace "root/MicrosoftIISv2" -Class "IISComputer" $IISComputer.BackupWithPassword("D:\Backup\Wednesday\", 1, 6, "QUESTTSTS")
I am presented with:
Exception calling "BackupWithPassword" : "Win32: The parameter is incorrect. At line:1 char:32
Having tried various combinations of brackets, quotes, flags, etc. I haven't really got any further with figuring out why this dosn't work.
Any thoughts on getting this to work, I am aware of iisback.vbs and other mechanisms for doing this. This is as much an excercise as a practicable solution to a problem.