# VSCode and Code Setup

## Overview

The following section goes over setting up the code repository and how to deploy it via VSCode.

### 1. Create a Code Directory in PS

```powershell
PS C:\Users\cthfm> mkdir code

    Directory: C:\Users\cthfm


Mode                 LastWriteTime         Length Name
----                 -------------         ------ ----
d-----          3/3/2025  10:12 PM                code


PS C:\Users\cthfm>
```

### 2. Change Directories and Git Clone the Repository

```
PS C:\Users\cthfm> cd code
PS C:\Users\cthfm\code> git clone https://github.com/Cthfm/azure-detection-lab.git
Cloning into 'azure-detection-lab'...
remote: Enumerating objects: 50, done.
remote: Counting objects: 100% (50/50), done.
remote: Compressing objects: 100% (44/44), done.
remote: Total 50 (delta 13), reused 26 (delta 5), pack-reused 0 (from 0)
Receiving objects: 100% (50/50), 29.65 KiB | 138.00 KiB/s, done.
Resolving deltas: 100% (13/13), done.
PS C:\Users\cthfm\code>
```

### 3. Open VSCode

```powershell
PS C:\Users\cthfm\code> code
```

### 4. Open Folder

<figure><img src="https://3768441748-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtHNfXXO5Vftq8PTOhkb3%2Fuploads%2FGmP3e5TygLLRkJ2ie2ip%2Fopenfolder_vscode.png?alt=media&#x26;token=002b49c1-e946-4fa7-879c-da1e7241e026" alt=""><figcaption></figcaption></figure>

### 5. Select the 'Code' Folder

<figure><img src="https://3768441748-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtHNfXXO5Vftq8PTOhkb3%2Fuploads%2FzS63iE7B0B47vmgacJ4T%2Fimage.png?alt=media&#x26;token=a6398d37-4640-480f-99d2-254178a79459" alt=""><figcaption></figcaption></figure>

### 6. Select the folder

<figure><img src="https://3768441748-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtHNfXXO5Vftq8PTOhkb3%2Fuploads%2FLCRrnsMIMiCc4VwsQngU%2Fimage.png?alt=media&#x26;token=aa847fa5-3772-418d-bb17-cc27a81244d4" alt=""><figcaption></figcaption></figure>

### 7. Accept the code from the author.

<figure><img src="https://3768441748-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FtHNfXXO5Vftq8PTOhkb3%2Fuploads%2FkAPSKAW9djVg8gFRwRzX%2Fimage.png?alt=media&#x26;token=8d9ce6c3-ae19-44c9-a2a4-a60b3d1d4350" alt=""><figcaption></figcaption></figure>
