Files
Borealis-Github-Replica/Scripts/Examples/Write Canary to Specific User Folder.ps1

9 lines
299 B
PowerShell

# Dynamically get the current user's Desktop path
$desktopPath = "C:\Users\nicole.rappe\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