# Lab 5.0: AD GPO

### Summary

This lab seemed very straight forward but I was never able to figure out the 1612 error I was getting. It didn't matter what permissions I gave the file share it would continue to do this. I almost wish we had used a program like sccm because I use that on a daily basis and I am able to understand permissions there. Overall the rest of this lab went well I wish I was able to actually complete it though.

### Powershell

#### Creating an OU

* `New-ADOrganizationalUnit “<Name>” –Path “DC=paul,DC=local”`

#### Delete an OU

* `Get-ADOrganizationalUnit -filter "Name -eq '<Name>'" | Set-ADOrganizationalUnit -ProtectedFromAccidentalDeletion $False`
* `Get-ADOrganizationalUnit -filter "Name -eq 'Continents'" | Remove-ADOrganizationalUnit –Recursive`

I had no problems but I know people had an issue with the accidental deletion variable.

#### Get event in Powershell

* `Get-WinEvent -FilterHashTable @{loginame='System'; id=<Id>} -MaxEvents 1` This will list 1 event with the ID from the System tab


---

# 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://paul-gleason.gitbook.io/sys-265-system-admin.-and-network-services-ii/labs/lab-5.0-ad-gpo.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.
