Created
May 29, 2018 02:02
-
-
Save VibhuKuchhal/5851d2033ca424589784017b434b04a5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$creds = & 'D:\codes\AutomationScripts\GetCredentials.ps1' | |
$listName = "Migrationsconfig" | |
Connect-PnPOnline -Url https://yourtenant.sharepoint.com/sites/MigrationConfigurations -Credentials $creds | |
New-PnPList -Title $listName -Template GenericList -OnQuickLaunch | |
Add-PnPField -List $listName -DisplayName 'Source' -InternalName 'Source' -AddToDefaultView -Type Text -Group 'Custom' -Required | |
Add-PnPField -List $listName -DisplayName 'DestinationSite' -InternalName 'DestinationSite' -AddToDefaultView -Type Text -Group 'Custom' -Required | |
Add-PnPField -List $listName -DisplayName 'DestinationLibrary ' -InternalName 'DestinationLibrary' -AddToDefaultView -Type Text -Group 'Custom' -Required | |
Add-PnPField -List $listName -DisplayName 'ReadyToMigrate' -InternalName 'ReadyToMigrate' -AddToDefaultView -Type Boolean -Group 'Custom' | |
Add-PnPField -List $listName -DisplayName 'MigrateAllData' -InternalName 'MigrateAllData' -AddToDefaultView -Type Boolean -Group 'Custom' | |
Add-PnPField -List $listName -DisplayName 'MigrationDate' -InternalName 'MigrationDate' -AddToDefaultView -Type DateTime -Group 'Custom' | |
Add-PnPField -List $listName -DisplayName 'Started' -InternalName 'Started' -AddToDefaultView -Type Boolean -Group 'Custom' | |
Add-PnPField -List $listName -DisplayName 'Migrated' -InternalName 'Migrated' -AddToDefaultView -Type Boolean -Group 'Custom' | |
Add-PnPField -List $listName -DisplayName 'TerminalName' -InternalName 'TerminalName' -AddToDefaultView -Type Text -Group 'Custom' | |
Set-PnPDefaultColumnValues -List $listName -Field Title -Value 'Migration' -WarningAction Ignore | |
Set-PnPDefaultColumnValues -List $listName -Field ReadyToMigrate -Value 0 -WarningAction Ignore | |
Set-PnPDefaultColumnValues -List $listName -Field MigrateAllData -Value 0 -WarningAction Ignore | |
Set-PnPDefaultColumnValues -List $listName -Field Started -Value 0 -WarningAction Ignore | |
Set-PnPDefaultColumnValues -List $listName -Field Migrated -Value 0 -WarningAction Ignore | |
$titleField = Get-PnPField -List $listName -Identity 'Title' | |
$titleField.DefaultValue = "Migration Task" | |
$titleField.Required = $false | |
$titleField.Update() | |
#Remove-PnPList -Identity $listName -Force |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment