Files
Borealis-Github-Replica/Scripts/Examples/Write Canary to CurrentUser Desktop.ps1

9 lines
307 B
PowerShell

# Dynamically get the current user's Desktop path
$desktopPath = [Environment]::GetFolderPath('Desktop')
# Define the file path relative to the Desktop
$filePath = Join-Path $desktopPath "Canary.txt"
# Write some content into the file
"USER Canary is alive." | Out-File -FilePath $filePath -Encoding UTF8