# AddFolder
**EventNames:**
- AddFolder_Restrictions
- AddFolder_Pre
- AddFolder_Post
**Parameters**
| Type | Name | Description |
| -------------------------------------------------------- | ------------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| [Folder](powervault:code_reference/objects/folder) | folder | The folder which should get / is added.
**Restrictions and Pre:**
In *Restrictions* and *Pre* you have the very limited data set on this object like `_NewName` and `_NewLibrary`.
**Post:**
In *POST* its an usual powerVaultFolder object, because at this point the folder exists. |
| [Folder](powervault:code_reference/objects/folder) | parentFolder | The parent folder where the new folder will be / is added. |
| bool | successful | **Post**:
The information whether the Web Service call was successful or not is only available in *Post* events. |
**Examples:**\
AddFolder_Restrictions:
```PowerShell
Register-VaultEvent -EventName AddFolder_Restrictions -Action 'RestrictAddFolder'
function RestrictAddFolder($folder, $parentFolder) {
#Write event code here
}
```
AddFolder_Pre:
```PowerShell
Register-VaultEvent -EventName AddFolder_Pre -Action 'PreAddFolder'
function PreAddFolder($folder, $parentFolder) {
#Write event code here
}
```
AddFolder_Post:
```PowerShell
Register-VaultEvent -EventName AddFolder_Post -Action 'PostAddFolder'
function PostAddFolder($folder, $parentFolder, $successful) {
#Write event code here
}
```