<#
You might need to do the following in an Admin Powershell script:
	Set-ExecutionPolicy Unrestricted
	or to avoid prompts each time you try to run
	Set-ExecutionPolicy Bypass -Scope CurrentUser
#>

$trace=0
write-host "There are a total of $($args.count) arguments"
for ( $i = 0; $i -lt $args.count; $i++ ) {
	write-host "Argument $i is $($args[$i])"

	if ( $args[$i] -eq '-t' ) {
		write-host "setting -t NOTE -T is same in PowerShell"
		$trace=1
	}

	if ( $args[$i] -eq '-a' ) {
		$i1=$i+1
		write-host "setting -a with $($args[$i1])"
		$i=$i+1
	}
}

if ($trace -gt 0) {
	write-host "trace is on ($trace)"
	write-host "Starting at $(get-date -Format F)"
}