0

I would like to check the time passed from the last time a SharePoint file has been modified, but I cannot use the server time for the comparison, since it's different from the SharePoint one.

Is there a way to get the SharePoint current date in the Sharepoint Server PowerShell context?

Thanks :)

1 Answer 1

0

I made it in this way

$web = Get-SPWeb $sourceSite
[Microsoft.SharePoint.Utilities.SPUtility]::GetServerNow($web)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.