Last active
July 7, 2017 07:18
-
-
Save ypcode/19ec1b2247ede25fdf4949f2bea33b97 to your computer and use it in GitHub Desktop.
Provision a Hardware Requests SharePoint list to the specified site
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
$webUrl = "https://<tenant>.sharepoint.com/sites/<yoursite>" | |
If (Get-PnPContext) {} Else { Connect-PnPOnline $webUrl } | |
New-PnPList -Template GenericList -Title "Hardware Requests" -Url "HardwareRequests" | |
$hwList = Get-PnPList -Identity "Hardware Requests" | |
Add-PnPField -List $hwList -Type Choice -InternalName "HW_HardwareType" -DisplayName "Type" -AddToDefaultView -Required -Choices "Keyboard","Mouse","Display","Hard drive" | |
Add-PnPField -List $hwList -Type Number -InternalName "HW_Quantity" -DisplayName "Quantity" -AddToDefaultView -Required | |
Add-PnPField -List $hwList -Type Note -InternalName "HW_Remark" -DisplayName "Remark" -AddToDefaultView -Required | |
Add-PnPField -List $hwList -Type Boolean -InternalName "HW_Approved" -DisplayName "Approved" -AddToDefaultView | |
Add-PnPField -List $hwList -Type Note -InternalName "HW_RejectionReason" -DisplayName "Rejection Reason" -AddToDefaultView |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment