PowerShell script that will move the SharePoint log files and set the retention of the log files.
To run this script you will need to set the PowerShell execution policy using the following PowerShell command:
set-executionpolicy Unrestricted
Copy the following code and paste it into a PowerShell script file like SetSPLog.ps1. To call this from the command line or within a command script ...
Posted by Travis Lingenfelder on
Friday, 27 Feb 2009 01:52.
When developing scripts (and almost anything else) I prefer to hard-code any settings thay may need to be changed later. One method that I employ while writing PowerShell scripts is the use of a settings.ini file. In this file I can place any configuration information and when I need to change a setting or run the script against another environment I only need to modify a single file.
Withi...
Posted by Travis Lingenfelder on
Friday, 27 Feb 2009 01:45.