Initialer Import der Synology Scripts

This commit is contained in:
root
2026-08-05 08:43:57 +02:00
commit 5e32a7c411
404 changed files with 79932 additions and 0 deletions
+25
View File
@@ -0,0 +1,25 @@
function New-LogFile {
param($LogPath)
```
if (!(Test-Path $LogPath)) {
New-Item -ItemType Directory -Path $LogPath | Out-Null
}
return Join-Path $LogPath ("Shutdown_{0}.log" -f (Get-Date -Format "yyyy-MM-dd_HH-mm-ss"))
```
}
function Write-Log {
param(
[string]$Message,
[string]$Level = "INFO"
)
```
$line = "[{0}] {1}" -f $Level, $Message
Write-Host $line
```
}