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
#requires -version 3 | |
<# | |
.SYNOPSIS | |
Generate-SpiceworksTicketReports.ps1 - Spiceworks open ticket reporting | |
.DESCRIPTION | |
Reads the SpiceWorks database to generate emails about open tickets. Sends an email to each | |
operator with their open tickets. | |
Requires the SQLite PowerShell provider: https://psqlite.codeplex.com/ |
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
#Requires -Version 4.0 -RunAsAdministrator | |
<# | |
.SYNOPSIS | |
Manage-WiFiStatus.ps1 - Enable/Disable WiFi based on wired connectivity status | |
.DESCRIPTION | |
Disables the Wi-Fi adapter if the wired one is connected, and vice versa. | |
This is built for internal use on Windows 8.1, and depends on the new *-NetAdapter cmdlets in PS 4.0 |
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
<# | |
.SYNOPSIS | |
Enable-DisabledOfficeAddins.ps1 - Enable specific Office add-ins | |
.DESCRIPTION | |
Re-enables specific Microsoft Office add-ins that are: | |
1. Listed in Disabled Items | |
2. Disabled in COM Add-Ins | |
This is designed to re-enable troublesome add-ins that often get disabled by Office. In this case, |
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
#requires -version 3 | |
<# | |
.SYNOPSIS | |
Get-ProliantDiskDrives - Get HP ProLiant disk drive status for PRTG | |
.DESCRIPTION | |
Reads the status of HP ProLiant Smart Array disk drives via WMI and HP WBEM | |
http://www.hp.com/go/HPwbem |
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
#requires -version 3 | |
<# | |
.SYNOPSIS | |
Get-ProliantTemperatures - Get HP ProLiant temperature sensor readings and status for PRTG | |
.DESCRIPTION | |
Reads the status of HP ProLiant temperatures sensors via WMI and HP WBEM | |
and | |
http://www.hp.com/go/HPwbem |
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
<# | |
.SYNOPSIS | |
Migrate-OfficescanClient - Migrate Officescan clients to the correct server | |
.DESCRIPTION | |
Checks which server the Officescan client is pointing to (by reading ofcscan.ini) | |
If it's pointing to the wrong one, call the appropriate ipxfer command with | |
the correct parameters to point it to the new/correct server |
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
<# | |
.SYNOPSIS | |
Remove-FilesiteViews.ps1 - Remove VDM files for all users | |
.DESCRIPTION | |
This script is designed to be run under the SYSTEM account, as it needs | |
access to every user's profile. This will work fine as a scheduled task, or | |
under SCCM or similar. | |
As per the release notes for Filesite 9.0 Update 5, all VDM files need to be deleted |
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 |
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
$apikey = "paste in your API key here" | |
$geckoPushUrl = "paste in your push URL here" | |
# Get the count of open tickets from the database | |
$openTickets = Invoke-Item spiceworks: -sql 'select count() as "count" from tickets where status == "open"' | |
#Construct a here-string with the required json format | |
$jsonstream = @" | |
{ | |
"api_key":"APIKEY", |
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
$query = @" | |
select t.id as id,t.summary as summary,t.description as description,u.first_name || ' ' || u.last_name as name, round((julianday(date('now','localtime')) - julianday(t.created_at))) + 1 as days, t.category as category from tickets as t | |
inner join users as u on t.created_by = u.id | |
where status == 'open' | |
order by t.created_at desc | |
"@ | |
$apikey = "paste API key here" | |
$geckoPushUrl = "paste push URL here" |
OlderNewer