Compare commits
2
Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
298b8ef050 | ||
|
|
2885d975f4 |
@@ -17,6 +17,13 @@ For ($i = 0; $i -lt 1200; $i++) {
|
||||
# Exit if the BSOD report was not created
|
||||
If ( !(Test-Path $BSODReport) ) { Write-Output "BSOD report was not found: ${BSODReport}" ; Return }
|
||||
|
||||
# Exit if the BSOD report is empty
|
||||
If ( (Get-Content -Path $BSODReport).Length -eq 0 ) {
|
||||
Write-Output "BSOD report is empty: ${BSODReport}"
|
||||
Remove-Item $BSODReport -Force
|
||||
Return
|
||||
}
|
||||
|
||||
# Create ticket
|
||||
$BSODReportContent = $(Get-Content -Path $BSODReport) -join "`n"
|
||||
New-RMMTicket -Subject "System Crash on ${Env:COMPUTERNAME}" -InitialIssue $BSODReportContent
|
||||
|
||||
@@ -1106,6 +1106,14 @@ Function New-TicketTimerEntry () {
|
||||
Create-Syncro-Ticket-TimerEntry -TicketIdOrNumber $TicketID -StartTime $StartAt -DurationMinutes $BillableMinutes -Notes $Comment -UserIdOrEmail $BillableUser -ChargeTime $ChargeTime
|
||||
}
|
||||
|
||||
# Function to get the SHA256 hash of a string
|
||||
Function Get-StringHash() {
|
||||
param([Parameter(Mandatory=$true,ValueFromPipeline=$true)][string]$String)
|
||||
$stream = [IO.MemoryStream]::new([byte[]][char[]]$String)
|
||||
$hashObj = Get-FileHash -InputStream $stream -Algorithm SHA256
|
||||
$hashObj.Hash
|
||||
}
|
||||
|
||||
# Initial setup of the MSP management directories and log file
|
||||
Setup-MSPDirectories
|
||||
Setup-LogFile
|
||||
|
||||
Reference in New Issue
Block a user