Unable to execute .\spbackup.ps1

Dec 5, 2012 at 9:52 AM

Dear All,
I copied the both files SPBackup.ps1 and SPBackup.xml in  C:\SPBackup directory. when i  execute the script SPBackup.ps1 i m getting the following error

need parameter Configurationfile <e.g. "C:\SPbackup\SPbackup.xml">
At C:\SPbackup\spbackup.ps1:16 char:41
+ [string]$Configurationfile = " $(throw <<<< "need parameter Configurationfile (e.g. ""c:\SpBack\SPBackup.xml"")")
)
 +Categoryinfo : OperationStopped: < need paramter ...\SPBackup.xml"> [],RuntimeException
 +FullyQualifiedErrorID : need parameter Configurationfile < e.g. "C:\SPBackup\SPBackup.xml">

spbackup.XML FILE
<?xml version="1.0" ?>
<confSPBackup>
   <site id="1"> ( No idea about this )
    <catastrophicbackup>1</catastrophicbackup>
    <catastrophicmethod>full</catastrophicmethod>
    <sitecollectionbackup>0</sitecollectionbackup>
    <sitecollectionurl></sitecollectionurl>
    <hivebackup>1</hivebackup>
    <hive>C:\Program Files\Common Files\Microsoft Shared\web server extensions\12</hive>
    <iisbackup>1</iisbackup>
    <iisencryptopassword>MetaBackupPass1</iisencryptopassword>  
    <smtpserver>webmail.xyz.com</smtpserver>
    <fromemail>r.sahibzada@xyz.com</fromemail>
    <toemail>r.sahibzada@xyz.com</toemail>
    <backupdestination>\\10.0.0.1\sp</backupdestination>
    <backupdestinationmaxkeepdays>0</backupdestinationmaxkeepdays>
   </site>
   <site id="2">
    <catastrophicbackup>0</catastrophicbackup>
    <catastrophicmethod>full</catastrophicmethod>
    <sitecollectionbackup>1</sitecollectionbackup>
    <sitecollectionurl>http://extranet.domain.com</sitecollectionurl>
    <hivebackup>1</hivebackup>
    <hive>C:\Program Files\Common Files\Microsoft Shared\web server extensions\12</hive>
    <iisbackup>0</iisbackup>
    <iisencryptopassword>MetaBackupPass1</iisencryptopassword>      
    <smtpserver>mailsrv</smtpserver>
    <fromemail>sharepoint1@domain.com</fromemail>
    <toemail>administrator@domain.com</toemail>
    <backupdestination>\\backupserver\spbackup</backupdestination>
    <backupdestinationmaxkeepdays>14</backupdestinationmaxkeepdays>
   </site>
</confSPBackup>

Best regards,

Jan 6, 2014 at 12:21 PM
Edited Jan 6, 2014 at 12:23 PM
Please run the script manually with the following parameter:

C:\SPBackup> .\SPBackup.ps1 -ConfigurationFile C:\SPBackup\SPBackup.xml