Remove-EnvironmentFiles
Removes all App_Config\Include folders which don't match the current environment and role.
Syntax
Remove-EnvironmentFiles [-WebRoot] <String> [-Environment] <String> [-Role] <String> [-ConfigPath] <String> [<CommonParameters>]
Description
Removes all App_Config\Include folders which don't match the current environment and role. The exact pattern of folders, which should not be deleted can be configured in KeepAppConfigIncludes
Parameters
-WebRoot <String>
The path to the WebRoot.
| Position | Required | Default value | Accept pipeline input | Accept wildchard characters |
|---|---|---|---|---|
| 1 | true | false | false |
-Environment <String>
The current envrionment.
| Position | Required | Default value | Accept pipeline input | Accept wildchard characters |
|---|---|---|---|---|
| 2 | true | false | false |
-Role <String>
The current role.
| Position | Required | Default value | Accept pipeline input | Accept wildchard characters |
|---|---|---|---|---|
| 3 | true | false | false |
-ConfigPath <String>
| Position | Required | Default value | Accept pipeline input | Accept wildchard characters |
|---|---|---|---|---|
| 4 | true | false | false |
Examples
-------------------------- EXAMPLE 1 --------------------------
Remove-EnvironmentFiles -WebRoot D:\webs\my -Environment dev -Role author