cancel
Showing results for 
Search instead for 
Did you mean: 

problem with running of "CretaeImageNow.PS1"

rashi_jain
Level 5

i am running this script  "./createImageNow.ps1 [UNCPATH] .

steps to tun the script :  "./createImageNow.ps1  //192.168.125.30/est2 .This command is run successfully but this script always take the backup of   c drive .

 

 

I want to change backup path from c drive to another drive.

 

 

Please help me to resolve the issue

 

1 ACCEPTED SOLUTION

Accepted Solutions

Markus_Koestler
Moderator
Moderator
   VIP   

So borrowing from AddImageJob.ps1 leads to the following:

 

Replace if($oTempVol.System -eq $true) {.....}

with

if($oTempVol.MountPoint -eq "C:\")
        {
            $oVolume = $oTempVol
        }

 

View solution in original post

25 REPLIES 25

lmosla
Level 6

Hello,

Not really familiar with running this type of script but have you seen this:  ftp://70.167.244.147/Sym_System_Recovery_2013_11.0.0.46600_Multilingual_Product/Docs/Automation/CreateImageNow.ps1.html  

hope it helps

rashi_jain
Level 5
Hello Imsola & all, this link consists only scripts but i need how to change the backup path of drives. from default to something else right now it take backup from c drive but i need e drive. Please help me to find out the solution

Markus_Koestler
Moderator
Moderator
   VIP   

Did you take a look inside the powershell script?

rashi_jain
Level 5
Hello Markus , I checked the all scripts in automation folder (this folder name is same earlier told by you) but no where I found the location of data path where I can changed. Please provide me your support for the solution of problem. Regards Rashi Jain

Markus_Koestler
Moderator
Moderator
   VIP   

Can you please post the code of the powershell script? I can't FTP at the moment.

rashi_jain
Level 5
Hello Markus , Please find the attachment of scripts.

Markus_Koestler
Moderator
Moderator
   VIP   

This is the one to blame for:

        if($oTempVol.System -eq $true)

If I'm right this statement ensures that only the systemvolume is backed up.

rashi_jain
Level 5
Hello Markus can I changed the backup path from system to something else (i.e. C Drive to E drive) ?

Markus_Koestler
Moderator
Moderator
   VIP   

If you just remove the if statement ALL local disks will be included.

rashi_jain
Level 5
Hello Markus , I want to take backup of particular disk not all disk . Scenario is : if a system having 2 or more disk , then i want to take the backup of 1 particular disk . according to your comment , I think it will take the backup of all disk. Regards Rashi

Markus_Koestler
Moderator
Moderator
   VIP   

You will have to findout the relevant attribute, like $oTempVol.label or so.

rashi_jain
Level 5
Hello Markus , can you please tell me about any debugging tool so that I can understand the flow of code.

Markus_Koestler
Moderator
Moderator
   VIP   

The windows integrated windows powershell editor ?!

rashi_jain
Level 5
Hello Markus , Thanks for your support. But i need more help if you or someone help me to find the solution.

Markus_Koestler
Moderator
Moderator
   VIP   

OK, would it be OK to have the volumes to back up hardcoded in the script?

rashi_jain
Level 5
Hello Markus , It is definitely good for me . Regards Rashi Jain

Markus_Koestler
Moderator
Moderator
   VIP   

So borrowing from AddImageJob.ps1 leads to the following:

 

Replace if($oTempVol.System -eq $true) {.....}

with

if($oTempVol.MountPoint -eq "C:\")
        {
            $oVolume = $oTempVol
        }

 

rashi_jain
Level 5
Hello Markus , Thanks for this help .

rashi_jain
Level 5
Hello Markus , This script is helping to take the backup of drive type and another question is how to take the backup of folder only (specified folder) . I am sorry for the another question but really I want your support . I got a file in automation folder "Filebackup" which might be help full.