Specify date field value in ISO format, for example
2016-03-09T00:00:00Z
Everything about Sharepoint
2016-03-09T00:00:00Z
Add-PSSnapin Microsoft.SharePoint.PowerShell
$site = Get-SPSite http://example.com
$web = $site.RootWeb
$user = $web.SiteUsers.GetByEmail("usr@example.com")
$user.Email = "user@example.com"
$user.Update()
foreach ($file in $files) {
$file.CheckOut()
$stream = $file.OpenRead()
$done = $list.RootFolder.SubFolders["Hertel"].Files.Add($file.Name, $stream, $true)
Write-Host $done.Name "Uploaded" -BackgroundColor Green
}
[void][System.Reflection.Assembly]::LoadWithPartialName("Microsoft.SharePoint")
$spSite = New-Object Microsoft.SharePoint.SPSite("http://url")
$webApp = $spSite.WebApplication
foreach ($site in $webApp.Sites) {
foreach ($web in $site.AllWebs) {
foreach ($list in $web.lists) {
if ($list.fields["Custom Field name"]) {
"List has custom field" | Out-File C:\filePath\log.txt -append
}
}
}
}