Required Files: SharedScriptRequiredFile 13
This will use Nirsoft BrowsingHistoryView to save the browser history for last 14 days from all users on the machine. You can easily add a specific username, or change the timeframe/browsers.
Import-Module $env:SyncroModule $zipFile = "C:\temp\bhv.zip" $outPath = "C:\temp" $cmdName = "Expand-Archive" $daysOfHistory = 14 #put a username here and it'll just get their history $userName = $null if (Get-Command $cmdName -errorAction SilentlyContinue){ write-host "$cmdName exists, expanding archive..." Expand-Archive -Path $zipFile -DestinationPath $outPath } else { write-host "Older powershell, oh well, lets try it..." Add-Type -AssemblyName System.IO.Compression.FileSystem [System.IO.Compression.ZipFile]::ExtractToDirectory($zipFile, $outPath) } if($userName){ write-host "About to capture the history for $userName" C:\temp\browsinghistoryview.exe /LoadIE 1 /LoadChrome 1 /LoadFirefox 1 /VisitTimeFilterType 3 /VisitTimeFilterValue $daysOfHistory /HistorySource 4 /HistorySourceFolder "C:\users\$userName" /shtml C:\temp\h.html } else { write-host "Capturing for all users..." C:\temp\browsinghistoryview.exe /LoadIE 1 /LoadChrome 1 /LoadFirefox 1 /VisitTimeFilterType 3 /VisitTimeFilterValue $daysOfHistory /HistorySource 1 /shtml C:\temp\h.html } start-sleep 10 write-host "Done capturing the history" get-content C:\temp\h.html write-host "Going to start uploading the file" Upload-File -Subdomain "test" -FilePath "C:\temp\h.html" del C:\temp\h.html write-host "All done, uploaded!" |