Skip to content

Instantly share code, notes, and snippets.

@dstreefkerk
Created December 5, 2014 05:38
Show Gist options
  • Save dstreefkerk/0aecf241bc86ed17bb68 to your computer and use it in GitHub Desktop.
Save dstreefkerk/0aecf241bc86ed17bb68 to your computer and use it in GitHub Desktop.
Spiceworks Geckoboard Wrapper Script
Import-Module sqlite
$scriptLocation = "C:\Scripts\Spiceworks-Geckoboard\"
$spiceworksDatabaseFilePath = "C:\Program Files (x86)\Spiceworks\db\spiceworks_prod.db" # Path to the SQLite database used by SpiceWorks
# Get all of the widget scripts
$allScripts = Get-ChildItem $scriptLocation -Filter "*.ps1"
# Mount the SpiceWorks database
mount-sqlite -name SpiceWorks -dataSource $spiceworksDatabaseFilePath
# Execute each script
foreach ($script in $allScripts) {
Write-Host "Executing $($script.FullName)"
& $script.FullName
}
Remove-PSDrive SpiceWorks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment