Monitoring

August 31, 2023 ยท View on GitHub

how to monitor resources in windows and also linux.keep in mind that win+x in windows os opens a menu bar that you can control so many other options too.

  • Shared FileSystems in CMD
  • users and groups in CMD
  • Get services in powershell
  • Search a file by CMD
  • How to monitor CPU tempeture in powershell

Shared FileSystems in CMD

How to see Shared FileSystems in CMD

  • Display shared filesystems:
    net share    
    
  • Display system hardware and related info:
    systeminfo   
    
  • Display running processes:
    tasklist   
    
  • To check the file system:
    sfc /scannow
    
  • List and configure power settings with the powercfg command,List all power schemes:
    powercfg /list
    
  • tasklist (display running processes)
    tasklist
    
  • taskkill (end process):
    taskkill /pid 1808 /f
    
  • The assoc (file association) command displays or modifies file name extension associations.List all current file name extension associations.
    assoc
    

users and groups in CMD

How to see users and groups in CMD.it is usefull when you want to manage them and give users permissions based on their accounts and groups.

  • 1.how to users:
    whoami/users
    
  • how to see groups:
    whoami/groups
    
  • how to both:
    whoami/all
    
  • To see Local Groups in Powershell:
    Get-LocalGroup
    
  • which users are currentlu using:
    qwinsta
    
  • Current User
    whoami /all
    
  • All Users
    net user
    
  • Add User
    net user hacker hack3d /add
    
  • Make User Admin
    net localgroup administrators hacker/add
    
  • Remove User
    net user hacker /del
    

Get services in powershell

to get services and their statuses:

Get-Service
  • to see services in CMD :
  • sc queryex type= service state= all
    
  • and also to see which ports they are listening at:
  • netstat -ano
  • Query a specific service:
  • sc query <SERVICE NAME>
    
  • Start a service:
  • sc start <SERVICE NAME>
    
  • Stop a service:
  • sc stop <SERVICE NAME>.
    

    Search a file by CMD

    just find .jpg files in that directory

    dir "*.jpg" /s
    

    How to monitor CPU tempeture in powershell

    Get-WmiObject -Query "SELECT * FROM Win32_PerfFormattedData_Counters_ThermalZoneInformation"