# Enumeration

### Introduction

The first step when you have gained initial access to any machine would be to enumerate

***

### Get Number of Users on a Machine

```powershell
Get-LocalUser
```

***

### Get Number of Local Groups

```powershell
Get-LocalGroup
```

***

### Get IP Address

```powershell
Get-NetIPAddress
```

***

### See Applied Patches

```powershell
Get-Hotfix
```

***

### Search for all files containing Specific Content

```powershell
Get-ChildItem C:\* -Recurse | Select-String -pattern SpecificContent
```

***

### Get list of Running Processes

```powershell
Get-Process
```

***

### Get list of Scheduled Tasks

```powershell
Get-ScheduleTask
```

***

### Check Owner of a Folder/File

```powershell
Get-Acl c:/
```

***


---

# 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://notes.nomanaziz.me/cybersecurity/penetration-testing/tryhackme/scripting/powershell/enumeration.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.
