MS-07-P1 PowerShell Flashcards
A command line interface from Microsoft. used for task automation, configuration management an script creation. current version is 5.1
PowerShell
The “arnold Swarzzenegrer version of the command line
PowerShell
Provides full access to the system, including Active Directory, for the performance of administrative tasks. Similar to CMD
PowerShell
Task-based command line vs command-line interpreter for Windows
PowerShell vs CMD
Object oriented vs String-based
PowerShell vs CMD
Newest version of PowerShell
PowerShell 7
Get, Set, Add, Clear, Write and Read
PowerShell syntax
this cmdlet displays information about PowerShell concepts and commands
Get-Help
Determine if you can load configuration files (such as PowerShell profiles) and run scripts
Execution Policies
Command line for execution policy
Set-ExecutionPolicy -exec bypass
Information can be filtered using parameters
Output Filtering
This cmdlet selects objects with specific property values from a collection of objects. Shows only services that are running
Where-Object
SE (Integrated Scripting Environment) is included in the Windows OS.
PowerShell ISE
Runs commands on a local or remote computer and returns all output, including errors. Runs commands on multiple computers
Invoke Commands
One interactive session at a time. Starts an interactive session with a single remote computer
Enter-PSSession
This cmdlet adds or more module to the current session
Import-Module
Creates user accounts
New-ADUser
Creates new groups
New-ADGroup
Changes multiple objects in a single action
Bulk Action Method
Shows all available commands for your session
Get-Command
Shows all services on the current computer
Get-Service
This command is similar to PIng on Powershell
Test-Connection
PowerShell includes a dynamic type scripting language that allows complex operations using PowerShell “commandlets”
cmdlets
is the built-in Windows PowerShell that is available by default in all modern versions of the Windows OS. PowerShell 7
PowerShell 5.1
was released after PowerShell 5.1, some Windows-related cmdlets are not applicable to other platforms
PowerShell 7
Modifies the properties of a user account
Set-ADUser
Deletes a user account
Remove-ADUser
Resets the password of a user account
Set-ADAccountPassword
Unlocks a user account after it was locked due to exceeding the number of incorrect login attempts
Unlock-ADAccount
Enables a user account
Enable-ADAccount
is one of many PowerShell modules used by penetration testers and attackers. attackers. It is an opensource, pen testing security framework that consists of multiple PowerShell modules and scripts that allow for various common penetration testing scenarios, such as code execution, persistence, reconnaissance, and exfiltration.
PowerSploit