27 lines
504 B
PowerShell
27 lines
504 B
PowerShell
param(
|
|
[Parameter(Mandatory=$true)]
|
|
[string]$url
|
|
)
|
|
|
|
function Write-File($msg)
|
|
{
|
|
($msg) | Out-File "log-condos-export.txt" -Append
|
|
}
|
|
|
|
function Write-Info($msg)
|
|
{
|
|
Write-Host $msg -foregroundcolor green
|
|
Write-File $msg
|
|
}
|
|
|
|
function Write-Warn($msg)
|
|
{
|
|
Write-Host $msg -foregroundcolor yellow
|
|
Write-File $msg
|
|
}
|
|
|
|
$site = Get-SPSite $url
|
|
foreach ($web in $site.RootWeb.Webs)
|
|
{
|
|
Write-Info ("Enable-SPFeature -Id 6d44d109-1726-4b8e-89ab-670222e7d81d -Url " + $web.Url + " -Force")
|
|
} |