Did a lot of research and tests but can't find a working solution. I have a few aspx site pages and I want to back them up onto network drive or my c drive because I don't want to lose them. but I cannot find a easy way to back them up. i have tried trying to download from the site pages but it doesn't show right when i save it outside of SharePoint. then I tried going to SharePoint designer and extracting the file from there. it keeps in a aspx file that opens up to code when its save outside of SharePoint. I may be on the right path but must being missing something. can someone help me?


You can use PowerShell cmdlets to do that.

A demo for your reference:

$web = Get-SPWeb "http://sp13/sites/team" 
$list = $web.lists["Site Pages"] 
$items = $list.items 

 foreach($item in $items) 

    $ie = new-object -ComObject "InternetExplorer.Application"
    $url = "http://sp13/sites/team/"+ $item.Url
    $ie.silent = $true
    while($ie.Busy) { Start-Sleep -Milliseconds 100 }
    Start-Sleep 10
    $ie.Document.documentElement.innerHTML > "C:\Pages\$targetFilePath.html"

More information, you can refer to: Archive SharePoint aspx pages as html

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.