%windir%\system32\WindowsPowerShell\v1.0\PowerShell.exe -ExecutionPolicy ByPass -File "%windir%\temp\PowerShellFile.PS1"
Function End-Script { <# .SYNOPSIS A function to wrap up the end of the script. .DESCRIPTION Function has multiple tasks: 1) Out-files the contents of $Error. 2) Out-files $Result 3) Terminates the Script. .PARAMETER $Result The result string to out-file. .EXAMPLE PS C:\> End-Script -Result $Result #> param ( [parameter(Mandatory = $true)] [String]$Result ) Out-File -InputObject $Error -FilePath $ErrorPath Out-File -InputObject $Result -Filepath $ResultsPath Write-Log ("********************************") Write-Log ("* $ScriptName Script Ends *") Write-Log ("********************************") exit; } Function Write-Log { <# .SYNOPSIS A function to write ouput messages to a logfile. .DESCRIPTION This function is designed to send timestamped messages to a logfile of your choosing. Use it to replace something like write-host for a more long term log. .PARAMETER StrMessage The message being written to the log file. .EXAMPLE PS C:\> Write-Log -StrMessage 'This is the message being written out to the log.' #> Param ( [Parameter(Mandatory = $True, Position = 0)] [String]$Message ) add-content -path $LogFilePath -value ($Date + "`t:`t" + $Message) }
Trouble logging in? Simply enter your email address OR username in order to reset your password.
For faster and more reliable delivery, add support@ebertlang.com to your trusted senders list in your email software.