Write PowerShell Output To Text File

Here is an example of how I use the Write-Output command to log every update my PowerShell script made. The $output variable needs to wrap the collection of items being updated (the foreach statement) if you want to combine all outputs into the same file. Then use the Write-Output function to state what needs to logged.

Unlock Documents With PowerShell

One of my users was constantly getting locked out of his own documents. Upon saving a document, he would receive the following error: "The file "filename" is locked for exclusive (or shared) use by "his username"" The issue was that his user only had "contribute" permissions. While that should be enough, he needed "edit" permissions to avoid … Continue reading Unlock Documents With PowerShell