A quick script to add items to a SharePoint list:
Import-Module PnP.Powershell
Connect-PnPOnline https://contoso.sharepoint.com/sites/test -Interactive
$users = @(
'Emily.Jones@contoso.com'
'Max.Wilson@contoso.com'
'Olivia.Davis@contoso.com'
'Ethan.Lee@contoso.com'
'Ava.Thompson@contoso.com'
'Lucas.Garcia@contoso.com'
'Mia.Patel@contoso.com'
'Benjamin.Taylor@contoso.com'
'Isabella.Nguyen@contoso.com'
'Alexander.Johnson@contoso.com'
)
foreach($u in $users){
$upn = $u
Add-PnPListItem -List "License Audit" -Values @{"Title" = $upn; "Keep_x0020_License" = "No"; "Notes" = "Imported
from PowerShell"}
}
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.