added func Get-StringHash
This commit is contained in:
@@ -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