Home » Powershell

Powershell Hash

Filehash (Get-FileHash)

Read More »

Powershell User Management

Create a local user account (New-LocalUser) Get local user accounts (Get-Localuser) Creates a local security group (New-LocalGroup) Show local groups

Read More »

Powershell Log-file management

Get event logs (Get-EventLog) -List All logs by entries -LogName System -Newest 10 Get newest from System log -LogName System -EntryType Error Get errors from a System log -LogName System -Message *description* All events that include a word

Read More »

Powershell Process & Service Management

Get all processes (Get-Process) power* Get all starting with *shell Get all ending with ??????ell Unknown charachters *a* Get all with “a” included -name *a* Must include “a” Start process (Start-Process) Stop process (Stop-Process) Get service (Get-Service) “win*” Get services…

Read More »

Powershell Disk Management

List drives (Get-Disk) List physical drives (Get-physicalDisk) List partitions (Get-Partition) List volumes (Get-Volume) Initialize disk (Initialize-Disk) New partition (New-Partition) Set partition (Set-Partition) Format volume (Format-Volume) Remove-Partition (Remove-Partition)

Read More »

Powershell File Management

Path to current location List directory items (Get-ChildItem) Create directory (New-Item) Create file (New-Item) Delete file (Remove-Item) Delete directory (Remove-Item) Copy file (Copy-Item) Move file (Move-Item) Read file content (get-content) Add content to file (Add-content)

Read More »