Loading powershell.md +40 −6 Original line number Diff line number Diff line Loading @@ -2,11 +2,9 @@ PowerShell is Windows new shell. It comes by default from Windows 7. But can be downloaded and installed in earlier versions. - PowerShell provides access to almost everything an attacker might want. - It is based on the .NET framework. - It is basically bash for windows * PowerShell provides access to almost everything an attacker might want. * It is based on the .NET framework. * It is basically bash for windows ## Basics Loading @@ -17,9 +15,45 @@ Get-Help <cmdlet name | topic name> ``` Example ``` get-help echo get-help get-command ``` **Powershell Version and Build** ``` $PSVersionTable ``` **Wget / Download a file** ``` Invoke-WebRequest <uri> wget <uri> ``` **List all files in current directory** ``` get-childitem gci List hidden files too gci -Force List all files recurisvely gci -rec Count the files (get-childitem).count ``` ### Network related stuff Domain information ``` Get-ADDomain ``` Loading
powershell.md +40 −6 Original line number Diff line number Diff line Loading @@ -2,11 +2,9 @@ PowerShell is Windows new shell. It comes by default from Windows 7. But can be downloaded and installed in earlier versions. - PowerShell provides access to almost everything an attacker might want. - It is based on the .NET framework. - It is basically bash for windows * PowerShell provides access to almost everything an attacker might want. * It is based on the .NET framework. * It is basically bash for windows ## Basics Loading @@ -17,9 +15,45 @@ Get-Help <cmdlet name | topic name> ``` Example ``` get-help echo get-help get-command ``` **Powershell Version and Build** ``` $PSVersionTable ``` **Wget / Download a file** ``` Invoke-WebRequest <uri> wget <uri> ``` **List all files in current directory** ``` get-childitem gci List hidden files too gci -Force List all files recurisvely gci -rec Count the files (get-childitem).count ``` ### Network related stuff Domain information ``` Get-ADDomain ```