SSL Url

Sep 4, 2008 at 8:25 PM
I am pretty new to PowerShell scripting... When I try the script with a site that is forced SSL the script starts to error out. It only seems to work under non SSL correctly. Am I doing something wrong?$0$0$0$0Thanks$0
Coordinator
Sep 5, 2008 at 12:26 PM
Hmmm, yes I presume the error is caused by the filename that the script wants to create. It would be nice if you could post the error here.

Just for testing, could you add an extra line of code in the spbackup.ps1 just below $backupfilename = $sitecollectionurl.replace("http://","")

$backupfilename = $backupfilename.replace("https://","")

-and post your result here please,

Thanks
Sep 5, 2008 at 1:14 PM
Edited Sep 5, 2008 at 1:20 PM
This was the error:
Test-Path : The given path's format is not supported.
At C:\spbackup\spbackup.ps1:67 char:21
+  if (-not (test-path  <<<< $path))
Set-Content : The given path's format is not supported.
At C:\spbackup\spbackup.ps1:69 char:14
+   set-content  <<<< $path ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18))
Set-Content : The given path's format is not supported.
At C:\spbackup\spbackup.ps1:69 char:14
+   set-content  <<<< $path ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18))
Set-Content : The given path's format is not supported.
At C:\spbackup\spbackup.ps1:69 char:14
+   set-content  <<<< $path ("PK" + [char]5 + [char]6 + ("$([char]0)" * 18))
You cannot call a method on a null-valued expression.
At C:\spbackup\spbackup.ps1:73 char:37
+  $files | foreach {$zipfile.CopyHere( <<<< $_.fullname) }

I inserted the extra line of code and now it works flawlessly, thank you very much!!
I did remove the force SSL from the web site(can access via 80 and/or 443), not sure if that comes into play. in production the site will be forced SSL.