Click here to Skip to main content
15,885,278 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
hi,
i have windows server 2008r2 with sharepoint 2010 intalled


I got backup of one of my site by performing " Export site or list" option in central administration. then i got a file named xxx.cmp as site backup. I am restoring onto my another website through windows powershell using
" Import-SPWeb -Identity http://mysitecollectionname -Path C:\Abc\xxx.cmp"

but when i run it as a batch file i need to precompile the -Identity option where it has to restore the xxx.cmp file. Is there an option where the batch file should prompt user to enter the site url where it has to restore the xxx.cmp file. Do i need to change anything in the Import SPWeb command for this? Or is there any different command to be followed?

Pls help me out..
Any help wil be appreciated
Thanks in advance
Posted

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900