Created
December 5, 2014 05:38
-
-
Save dstreefkerk/0aecf241bc86ed17bb68 to your computer and use it in GitHub Desktop.
Spiceworks Geckoboard Wrapper Script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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