When i create sharepoint site with powershell:

$siteNomenclaturesURL =  "$holidaysSite/Nomenclatures"

New-SPWeb $siteNomenclaturesURL 
-Template "CMSPUBLISHING#0" 
-Name "Noms"  
-UseParentTopNav -Language 1026

$SPWebNomenclatures = Get-SPWeb -Identity $siteNomenclaturesURL 

I want to checkin welcome page for this webSite:


1 Answer 1


$spWeb=Get-SPWeb "SiteURL"

$folder = $spWeb.RootFolder


$page = $spWeb.GetFile($pageUrl);

if ($page.CheckedOutBy.UserLogin -eq $spWeb.CurrentUser.UserLogin)

$page.CheckIn("Page checked in automatically by PowerShell script")



Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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