Last active
May 12, 2017 20:29
-
-
Save buettiB/1298a0ddd80b9026d0c8bf6f9f2fbbc5 to your computer and use it in GitHub Desktop.
Erstellt Beispielelemente in einer SharePoint Liste
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
Add-PSSnapin Microsoft.SharePoint.PowerShell | |
cls | |
Write-Host "Start:" (Get-Date) | |
$list = (get-spweb http://hamburg/).Lists["Meine Liste"] | |
$auswahl = "Eins", "Zwei", "Drei" | |
for ($i = 1; $i -le 30; $i++) | |
{ | |
$newItem = $list.Items.Add() | |
$newItem["Title"] = 'Element {0} erstellt {1}' -f $i,(Get-Date) | |
$newItem["Auswahl"] = $auswahl[(Get-Random -Maximum 3)] | |
$newItem.Update() | |
} | |
Write-Host "Ende:" (Get-Date) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment