Security is Everyone's Job

Powershell Commands

Files & Folders

List of Files/Folders: Get-ChildItem

New File/Folder: New-Item

Copy File/Folder: Copy-Item

Move File/Folder: Move-Item

Delete File/Folder:Remove-Item

Rename File/Folder: Rename-Item

Read File: Get-Content

Write File: Set-Content

Append File: Add-Content

Get Folder: Get-Location

Change Directory: Set-Location

Push Directory: Push-Location

Pop Directory: Pop-Location

System & General

List Commands: Get-Command

Help: Get-Help

Aliases: Get-Alias

Create Alias: New-Alias

List of Variables: Get-Variable

Create a Variable: New-Variable

Running Processes: Get-Process

Stop Process: Stop-Process

Start Process: Start-Process

List of Services: Get-Service

Start Service: Start-Service

Stop Service: Stop-Service

Restart Service: Restart-Service

Event Logs: Get-EventLog

Write Log: Write-EventLog

Clear Log: Clear-EventLog

Get Date: Get-Date

Set Date: Set-Date

Get History: Get-History

Run History: Invoke-History

Sleep: Start-Sleep

Read Host: Read-Host

Write Host: Write-Host

Write Output: Write-Output


Enable Remote Access: Enable-PSRemoting

Disable Remote Access: Disable-PSRemoting

Start Remote Access: Enter-PSSession

Exit Remote Access: Exit-PSSession

Run Command Remote: Invoke-Command

New Session Remote: New-PSSession

Close Session Remote: Remove-PSSession

List of Remote Sessions: Get-PSSession

Import from Remote: Import-PSSession

Export to Remote: Export-PSSession

Get Credentials: Get-Credential

Get WMI: Get-WmiObject

Create WMI: Set-WmiInstance

Invoke WMI: Invoke-WmiMethod

Get Directory Users: Get-ADUser

Add Directory Users: New-ADUser

Modify Directory Users: Set-ADUser

Remove Directory Users: Remove-ADUser

Get Directory Groups: Get-ADGroup

Add Directory Groups: New-ADGroup

Modify Directory Groups: Set-ADGroup

Remove Directory Groups: Remove-ADGroup

Add User to Group: Add-ADGroupMember

Remove User of Group: Remove-ADGroupMember

Get Computer: Get-ADComputer

Get List of Domains: Get-ADDomain

Add Domain: New-ADDomain

Modify Domain: Set-ADDomain

Remove Domain: Remove-ADDomain

List of Trust: Get-ADTrust

New Trust Policy: New-ADTrust

Modify Trust Policy: Set-ADTrust

Remove Trust Policy: Remove-ADTrust

Sync Directory Servers: Sync-ADObject

Test Service Account: Test-ADServiceAccount

Install Service Account: Install-ADServiceAccount

Uninstall Service Account: Uninstall-ADServiceAccount

Get Service Account: Get-ADServiceAccount

Create Service Account: New-ADServiceAccount

Modify Service Account: Set-ADServiceAccount

Remove Service Account: Remove-ADServiceAccount

Get Directory Objects: Get-ADObject

New Directory Objects: New-ADObject

Modify Directory Objects: Set-ADObject

Remove Directory Objects: Remove-ADObject

Restore Directory Objects: Restore-ADObject

Move Directory Objects: Move-ADObject

Get Root Directory: Get-ADRootDSE

Get Memeber Group:

Search Directory Account: Search-ADAccount

Unlock Directory Account: Unlock-ADAccount

Disable Directory Account: Disable-ADAccount

Enable Directory Account: Enable-ADAccount