How quickly can you answer this question: Which Group Policies reference batch files, vbscripts, or PowerShells? What is the best way to get the information and present it into a spreadsheet? I did it by searching SysVol for the script.ini and psscript.ini files, then reading the contents for the script path, command line and parameters. If you have to answer this question for an auditor or your boss, then Get-GPOScriptList.ps1 is what you need.
Note that the output CSV file is Unicode. With this bit of code, $paramVal.Replace(‘”‘,”).Replace(‘-‘,[char]0x2013) , I replace dashes in parameters with the unicode em dash. This ensures that Excel doesn’t try to interpret the text line as a negative number. The spreadsheet contains the following columns: Domain, GPOName, Type, FilesInSysVol (are they present), LogonCmdLine, LogonParams, LogoffCmdLine, LogoffParams, StartUpCmdLine, StartUpParams,ShutdownCmdLine, ShutdownParams, GPOGUID, ScriptFolder, Remarks, and Errors.