Open PowerShell session with administrator privileges and this example restarts at 6pm
shutdown /r /t ((Get-Date -Hour 18 -Minute 0 -Second 0) - (Get-Date)).TotalSeconds
Open PowerShell session with administrator privileges and this example restarts at 6pm
shutdown /r /t ((Get-Date -Hour 18 -Minute 0 -Second 0) - (Get-Date)).TotalSeconds
add-type -path "C:\Program Files\Apteco\FastStats Service\Handel\Newtonsoft.Json.dll" | |
class DataItem { | |
[string]$id | |
[string]$name | |
} | |
# Define the main response class | |
class ApiResponse { | |
[int]$replyCode |
Steps to solve.
C:\Users\<username>\AppData\Local\Microsoft\Windows\PowerShell\PowerShellGet
C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\2.2.5\PSModule.psm1
#$stdOut -match "Successfully created package '(.*.nupkg)'" | Out-Null
################################################ | |
# | |
# INPUT | |
# | |
################################################ | |
#----------------------------------------------- | |
# DEBUG SWITCH | |
#----------------------------------------------- |
Download and install python: https://www.python.org/downloads/
Then open a powershell window and install flask
pip install flask
To change the priority of the current running powershell process, do it like
#-----------------------------------------------
# SET UP PRIORITY
#-----------------------------------------------
$processId = [System.Diagnostics.Process]::GetCurrentProcess().ID
$currentPriority = ( get-process -Id $processId ).PriorityClass
If ( $currentPriority -ne "High" ) {
# Remove previous jobs first | |
Get-Job | Remove-Job | |
$runs = 100 | |
$maxThreads = 10 | |
$start = [datetime]::Now | |
$c = 0 # completed jobs | |
$sum = 0 # sum of results |
Documentation: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.diagnostics/get-counter?view=powershell-5.1
Show all available counters, be careful, this seems to be language dependent
get-counter -listset * | Out-GridView
get-counter -listset "*Netzwerk*" | fl
get-counter -listset "*Netzwerk*" | % { $_.Counter }
Install-Dependencies.ps1 -LocalPackage DuckDB.NET.Bindings.Full, DuckDB.NET.Data.Full | |
Import-Dependencies.ps1 -LoadWholePackageFolder | |
$conn = [DuckDB.NET.Data.DuckDBConnection]::new("Data Source=:memory:;") | |
$conn.Open() | |
... | |
$conn.Close() |