Commit 5296f010 authored by Philip Linghammar's avatar Philip Linghammar
Browse files

Updates powershell.md

Auto commit by GitBook Editor
parent d50155c2
Loading
Loading
Loading
Loading
+40 −6
Original line number Diff line number Diff line
@@ -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

@@ -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
```