Powershell scripts to backup SQL, SVN

Posted by bszom on Stack Overflow See other posts from Stack Overflow or by bszom
Published on 2009-11-10T17:29:05Z Indexed on 2010/03/23 22:33 UTC
Read the original article Hit count: 267

Filed under:
|
|
|
|

I'm trying to use PowerShell to create some backups, and then to copy these to a web folder (or, in other words, upload them to a WebDAV share).

At first I thought I'd do the WebDAV stuff from within PowerShell, but it seems this still requires a fair amount of "manual labour", ie: constructing HTTP requests. I then settled for creating a web folder from the script and letting Windows handle the WebDAV stuff. It seems that all it takes to create a web folder is to create a standard shortcut, as described here.

What I can't figure out is how to actually copy files to the shortcut's target..? Maybe I'm going about this the wrong way.

It would be ideal if I could somehow encrypt the credentials for the WebDAV in the script, then have it create the web folder, shunt over the files, and delete the web folder again. Or even better, not use a web folder at all. Third option would be to just create the web folder manually and leave it there, though I'd rather not.

Any ideas/pointers/tips? :)

© Stack Overflow or respective owner

Related posts about powershell

Related posts about backup