Wednesday, January 27, 2016

Restore a Site Collection using PowerShell

Restoring the site collection once it gets deleted inadvertently.

You need the full URL of the site collection which you want to restore back to start. 
 
Step1 : For Example, I have a root level site collection having full URL as "http://<<host name>>:10000".
You  can execute Get-SPSite cmdlet to get the site object.
 $mysite = Get-SPSite http://<<host name>>:10000
 
Step2: You can print the GUID of that site by using "id" property of that object in last step.
PS C:\Users> $mysite.id
Guid
----
7044efc1-786f-493b-b3d5-0056add40bb9
 
Step 3: Then you can use "Get-SpDeletedSite" cmdlet with the id as a parameter to confirm the other details of that site collection such as path and deletion time.
 
PS C:\Users\> Get-SPDeletedSite $mysite.id
WebApplicationId   : 740953c9-7041-4130-994a-7d85864975d3
DatabaseId         : 78e0f455-c59d-4404-83c7-085309762fdc
SiteSubscriptionId : 00000000-0000-0000-0000-000000000000
SiteId             : 7044efc1-786f-493b-b3d5-0056add40bb9
Path               : /
DeletionTime       : 1/26/2016 9:40:22 PM
 
Step 4: Last step is to run "Restore-SPDeletedSite" cmdlet with the "-Identity" parameter. You have to pass on the same id or GUID which you got in last steps. Press 'Y' for confirmation.
 
PS C:\Users> Restore-SPDeletedSite -Identity $mysite.id
Confirm
Are you sure you want to perform this action?
Performing operation "Restore-SPDeletedSite" on Target "/".
[Y] Yes  [A] Yes to All  [N] No  [L] No to All  [S] Suspend  [?] Help
(default is "Y"):Y
 
After execution of step4, your site collection would get restored back.
 

4 comments:

  1. http://camaragenbandarq.blogspot.com/2017/05/membahas-macam-macam-judi-di-indonesia.html
    http://agenbandarqcamarqq.blogspot.com/2017/05/mengetahui-4-tempat-judi-termewah-di.html
    http://agendomino99camarqq.blogspot.com/2017/06/trik-curang-main-bandarq.html
    http://agendominocamar.blogspot.com/2017/06/mengetahui-warnet-di-jepang-yang.html
    http://agendominocamarqq.blogspot.com/2017/06/cara-mendaftar-di-shioqq-situs-agen.html
    http://www.jakartatercinta.com/2017/05/mengenal-situs-shioqq-agen-bandarq.html
    http://www.jakartatercinta.com/2017/05/shioqqnet-agen-bandarq-yang-memberi.html

    ReplyDelete
  2. TT4D | TOGEL TERPERCAYA | AGEN TOGEL ONLINE TERPERCAYA

    Dengan Fiture-fiture Terbaik sebagai berikut :
    • Hadiah Prize 4D dan 3D Semua Pasaran
    • BBFS 10 Digit Tanpa Batasan Line
    • Bonus Referral Sebesar 0,5% dari Semua Pemasangan Seumur Hidup
    • Tersedia Live Games dan Sbobet Bola atau Casino

    Hadiah & Diskon TT4D TOGEL TERPERCAYA :
    • HADIAH 4D x 3.000 ( 65% )
    • HADIAH 3D x 400 ( 59% )
    • HADIAH 2D x 70 ( 29% )

    Hadiah Hiburan Jackpot 4D & 3D Semua Pasaran :
    Prize I : x 3 Juta ( 4D ) | x 400 Ribu ( 3D )
    Prize II : 200 Ribu ( 4D ) | 20 Ribu ( 3D )
    Prize III : 100 Ribu ( 4D ) | 10 Ribu ( 3D )
    Started Prize : 55 Ribu ( Hanya 4D )
    Consolation : 25 Ribu ( Hanya 4D )

    Pasaran Tutup TerlamaTT4D Togel Terpercaya :
    • Vietnam Tutup Jam 11.00 WIB dan Result Jam 11.30 WIB
    • Sydney Tutup Jam 13.30 WIB dan Result Jam 13.50 WIB
    • Las Vegas Tutup Jam 15.30 WIB dan Result Jam 16.00 WIB
    • Singapore Tutup Jam 17.25 WIB dan Result Jam 17.45 WIB
    • Lemacau Tutup Jam 19.30 WIB dan Result Jam 20.00 WIB
    • Hongkong Tutup Jam 22.30 WIB dan Result Jam 23.00 WIB

    Website Login / Daftar :
    DAFTAR TT4D

    Kontak Official :
    - Pin BBM : TT4DOK
    - WA : +855963240368

    ReplyDelete
  3. Prediksi togel hongÄ·ong dan togel singapore Akurat 100% dan Arti Tafsir Mimpi

    https://www.klik4d.biz/prediksi-togel-akurat-hk-tanggal-27-desember-2019/

    https://www.klik4d.biz/kumpulan-makna-mimpi-sunat-dalam-togel/http://159.89.197.59/register/
    INFO Prediksi Togel : https://www.klik4d.site

    Agen Togel BOLAVITA
    BONUS POTONGAN GAMES TOGEL ONLINE

    PERMAINAN TOGEL KLIK4D :
    2D = 29,25%
    3D = 59,25%
    4D = 66%

    PERMAINAN TOGEL Isin4D :
    2D = 30%
    3D = 59%
    4D = 66%

    Bolavita Sekarang Bisa Deposit Via OVO & GO-Pay.
    Sekarang Bosku Sudah Bisa Deposit Via Pulsa XL & TSEL Minimal Deposit 25rb.

    Boss Juga Bisa Kirim Via :
    Telegram : +62812-2222-995
    Wechat : Bolavita
    WA : +62812-2222-995
    Line : cs_bolavita

    ReplyDelete
  4. Prediksi togel hongÄ·ong dan togel singapore Akurat 100% dan Arti Tafsir Mimpi

    https://www.klik4d.biz/prediksi-togel-akurat-hk-tanggal-24-januari-2020/

    https://www.klik4d.biz/prediksi-togel-akurat-sgp-tanggal-27-januari-2020/

    INFO Pendaftaran Togel : http://159.89.197.59/register/
    INFO Prediksi Togel : https://www.klik4d.site

    Agen Togel BOLAVITA
    BONUS POTONGAN GAMES TOGEL ONLINE

    PERMAINAN TOGEL KLIK4D :
    2D = 29,25%
    3D = 59,25%
    4D = 66%

    PERMAINAN TOGEL Isin4D :
    2D = 30%
    3D = 59%
    4D = 66%

    Bolavita Sekarang Bisa Deposit Via OVO & GO-Pay.
    Sekarang Bosku Sudah Bisa Deposit Via Pulsa XL & TSEL Minimal Deposit 25rb.

    Boss Juga Bisa Kirim Via :
    Telegram : +62812-2222-995
    Wechat : Bolavita
    WA : +62812-2222-995
    Line : cs_bolavita

    ReplyDelete