Powershell

SCP

  1. Linux → Windows

    scp -r [id]@[ip]:/home/ ./
  2. Windows -> Linux

    scp -r .\[file] [id]@[ip]:/home/
  3. Specify a port

    scp -P 5789 -r [id]@[ip]:/home/ ./

Generation tree folder

$Path = "C:\folder"
Tree $Path /F | Select-Object -Skip 2 | Set-Content C:\folder\output.txt

Commands about domain and administrators

Displays all information in the current access token, including the current user name, security identifiers (SID), privileges, and groups that the current user belongs to.

whoami /all

This command lists the users of the domain administrator group.

Net group “domain admins” /domain

This command lists all administrator users of the local PC.

Net localgroup administrators

This command returns a list of all trusted domains.

Nltest /domain_trusts /all_trusts