# pwsh

Kali come with PowerShell installed already, to run it use:&#x20;

`root@kali:~# pwsh`&#x20;

**If not installed use:**&#x20;

```
apt update && apt -y install curl gnupg apt-transport-https 
curl https://packages.microsoft.com/keys/microsoft.asc | apt-key add -
echo "deb [arch=amd64] https://packages.microsoft.com/repos/microsoft-debian-stretch-prod stretch main" > etc/apt/sources.list.d/powershell.list 
apt update 
apt install powershell 
```

**Example:**&#x20;

```
root@Kali:/opt/PowerUpSQL# pwsh 
PowerShell 6.2.2 
Copyright (c) Microsoft Corporation. All rights reserved. 
https://aka.ms/pscore6-docs 
Type 'help' to get help. 
PS /opt/PowerUpSQL> Import-Module .\PowerUpSQL.ps1  
PS /opt/PowerUpSQL>  
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://infra.newerasec.com/infrastructure-testing/tools/pwsh.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
