Skip to content

Great Code! how to add subsites? #198

@effyl01

Description

@effyl01

Thank you for the code.
I am trying to set versioning on for a a few sites and I am reading them from a text file.
All is well, but how to add so it will run on the sub-sites of those site collection as well.

foreach ($line in Get-Content c:\sites.txt) {
$sitecollection=Get-SPosite $line
set-Versioning -Url $sitecollection.url -Username $Username -Password $Password -Versioning $Versioning
}

thanks!
Effy.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions