Windows Commands

From Stadm
Jump to navigationJump to search

Helpful windows commands

Install ssh server

  • install cygwin, see link
  • open a cygwin windows as administrator and run
ssh-host-config
  • answer "yes" to questions:
    • Query: Should privilege separation be used? (yes/no)
    • Query: new local account 'sshd'? (yes/no)
    • Query: Do you want to install sshd as a service?
  • answer "ntsec" to question:
    • Query: Enter the value of CYGWIN for the daemon: []

FindingLargest Files

  • in power shell run
Get-ChildItem c:\ -Recurse | Where-Object {$_.Length -gt 1000MB}
  • can be abbreviated as well
gci c:\ -rec | where {$_.Length -gt 1000mb}