mirror of
https://github.com/EvotecIT/GPOZaurr.git
synced 2026-07-26 11:49:17 +00:00
Compare commits
228 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| f50a495690 | |||
| 6c2e29122e | |||
| 250683e830 | |||
| 0f04582b42 | |||
| d9de90718d | |||
| e8651b71fd | |||
| ecdd6fb8ec | |||
| 945e993843 | |||
| fdf78ecadb | |||
| fc9b191578 | |||
| 04e5eaf63c | |||
| 494b1582ca | |||
| c33b820e36 | |||
| cfeb0098a6 | |||
| e2bba32a57 | |||
| 1ca6673ee4 | |||
| cb9326e8b6 | |||
| 10be16ad53 | |||
| 0c26642a72 | |||
| 5d76f9125d | |||
| 5b930f4536 | |||
| b118000672 | |||
| 603de5a42e | |||
| 9fe0157293 | |||
| b3d5df8188 | |||
| 00ce6f42d7 | |||
| ec30c54577 | |||
| 1974eb2a39 | |||
| 03a09809ab | |||
| 825f9fda42 | |||
| a41fb8473b | |||
| d2f02e46e0 | |||
| dcff4516b4 | |||
| 651ee3f6c9 | |||
| 7aefc6047b | |||
| 2bca54fd06 | |||
| 3fd8872e5c | |||
| 57efc58c2f | |||
| 40e422682b | |||
| d2b9fc0960 | |||
| f8fdf1ff98 | |||
| 1d198dbd7c | |||
| 2dd780910a | |||
| ed22b56716 | |||
| 7bcef67820 | |||
| 1941577b24 | |||
| 97a189eda5 | |||
| 0759d1cb85 | |||
| 424e9d2f5c | |||
| 794f6997b8 | |||
| 175b6dede2 | |||
| 91bace0a05 | |||
| 7d829ac78d | |||
| caa9585906 | |||
| d0d6427b38 | |||
| 7c5622f682 | |||
| 12e183b45c | |||
| e52dc71857 | |||
| 9041f4cdbc | |||
| 6f503f735f | |||
| 27830e9f8a | |||
| d8c63ce949 | |||
| 33b2854d63 | |||
| acb51d4444 | |||
| 3bc9bb5f9c | |||
| 58d94edac0 | |||
| d76ae5cd1d | |||
| a11d563704 | |||
| 34c55c8482 | |||
| c6fdfccc61 | |||
| e512c0b0de | |||
| 7afd104b7b | |||
| 60511fa602 | |||
| 9b3924cc00 | |||
| 0bf093351f | |||
| 2d164750f1 | |||
| b8d440f547 | |||
| f25ace130c | |||
| 8b17f9e3a2 | |||
| b97cf1fd9d | |||
| 416b3f0273 | |||
| d3c31e9651 | |||
| 8b963c6b82 | |||
| 989d3ba9f0 | |||
| f3e2d3cc11 | |||
| a7b8b5f6ea | |||
| 7f2adbbb13 | |||
| a82e460406 | |||
| a0e990bf2a | |||
| ddc5630244 | |||
| d377e92fb5 | |||
| b8c3f1e8f8 | |||
| a827afab39 | |||
| 61bb568c94 | |||
| 3f4d8c9907 | |||
| f6466c2ca7 | |||
| 609d93118b | |||
| 193ddd6ff9 | |||
| 889ce5f9ab | |||
| ac224b41b7 | |||
| caaf541e91 | |||
| c856484932 | |||
| 9c3ea2bbe7 | |||
| 5071c0da07 | |||
| fd7c7e1b30 | |||
| 1e3a7a78c8 | |||
| d3f0e04f35 | |||
| fe080aece9 | |||
| 95b814f2f9 | |||
| 59dfa34ba9 | |||
| 9ecf092bd5 | |||
| e917092ac9 | |||
| 047576ff70 | |||
| 5d3370d546 | |||
| e514deca08 | |||
| c99c33d0fa | |||
| f841f41de0 | |||
| fb6931c5e1 | |||
| 9a43c466b7 | |||
| afd99d8e67 | |||
| edd6dbdfa5 | |||
| 9e837d2218 | |||
| 9030233e18 | |||
| d02396f591 | |||
| efb1ddf056 | |||
| f6c5cbe901 | |||
| a7583508f5 | |||
| f73c445385 | |||
| de4ff8ff07 | |||
| 7501693276 | |||
| e76c4d9094 | |||
| 2f25064090 | |||
| 97ffc8bfd5 | |||
| 27bd83eaba | |||
| 7cff95cc81 | |||
| 99d489290d | |||
| d94bf27669 | |||
| 570b1cbc83 | |||
| 2286f0cb0b | |||
| e253bb39e0 | |||
| 1054d8a38b | |||
| 3874098738 | |||
| 5d81539ba6 | |||
| 15b467b1ff | |||
| 75be102588 | |||
| dff222dbb4 | |||
| 428776afd7 | |||
| 2c078d3b2d | |||
| b8ed284648 | |||
| 8de9c32fd1 | |||
| 3cd490937b | |||
| 3557ecefc2 | |||
| 4b57f4bec0 | |||
| 28d941ec26 | |||
| d6ae5bfc7b | |||
| 9cb4392140 | |||
| c036634ac6 | |||
| 6a3049bc5c | |||
| 672c881927 | |||
| 6ffa7585c1 | |||
| 996621ab5c | |||
| de890e5c12 | |||
| 3611028f5b | |||
| 1eb4f79cd8 | |||
| 576d70703a | |||
| 99cf500817 | |||
| 7285dc7c9b | |||
| e9a534d498 | |||
| 2a31694ac3 | |||
| 33693a4880 | |||
| 261f38177f | |||
| 4e2ff76661 | |||
| 2370b95b69 | |||
| f7375bd537 | |||
| b57f131730 | |||
| 4acf509e2b | |||
| 4c0647b81f | |||
| 7415386a13 | |||
| db7838fc18 | |||
| 19e6d514a1 | |||
| 3375c10ee7 | |||
| ca030b5fee | |||
| 30660a9097 | |||
| 3e9848e705 | |||
| e04f5514f8 | |||
| 02dbe6c02c | |||
| 5959f31607 | |||
| 971f5a18e3 | |||
| 6e81f6f80f | |||
| 6c607b28f3 | |||
| 288306228c | |||
| fb2285437a | |||
| 3ff20afe30 | |||
| ff6ad6735d | |||
| fe97c15741 | |||
| 66b60fdbfa | |||
| ba9f741a8d | |||
| fc2ab5de2f | |||
| 131b92b2a1 | |||
| 3a4bf7ab56 | |||
| 106a10d37b | |||
| b22d6ada7f | |||
| cad485cd20 | |||
| c1f293e6f1 | |||
| 0f9ed02a04 | |||
| 9f7bdd287e | |||
| 5ac5b7f0a1 | |||
| b915216eb4 | |||
| 104aa43fd1 | |||
| 3691076d00 | |||
| c879c48b32 | |||
| 2c92e3f56e | |||
| c8ee43ee49 | |||
| a3e79a90e6 | |||
| 63479e7075 | |||
| 9471ca3435 | |||
| 9ada311bb1 | |||
| efd4ee1bba | |||
| 32b59ccc7f | |||
| 1499b2166d | |||
| 9675324b07 | |||
| f518548880 | |||
| f0f2b51c7d | |||
| b513acc29f | |||
| 2107d52eed | |||
| 905cbf44e1 | |||
| 8e86b91350 | |||
| 3e7fd7b5b7 |
@@ -0,0 +1,4 @@
|
||||
# These are supported funding model platforms
|
||||
|
||||
github: PrzemyslawKlys
|
||||
custom: https://paypal.me/PrzemyslawKlys
|
||||
@@ -0,0 +1,214 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPoZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Backup-GPOZaurr
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Backup-GPOZaurr [[-LimitProcessing] <Int32>] [[-Type] <String[]>] [[-Forest] <String>]
|
||||
[[-ExcludeDomains] <String[]>] [[-IncludeDomains] <String[]>] [[-ExtendedForestInformation] <IDictionary>]
|
||||
[[-GPOPath] <String[]>] [[-BackupPath] <String>] [-BackupDated] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -BackupDated
|
||||
{{ Fill BackupDated Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -BackupPath
|
||||
{{ Fill BackupPath Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 7
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOPath
|
||||
{{ Fill GPOPath Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 6
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -LimitProcessing
|
||||
{{ Fill LimitProcessing Description }}
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
{{ Fill Type Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Accepted values: All, Empty, Unlinked
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -WhatIf
|
||||
Shows what would happen if the cmdlet runs.
|
||||
The cmdlet is not run.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: wi
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -0,0 +1,197 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPoZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-GPOZaurr
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-GPOZaurr [[-GPOName] <String>] [[-GPOGuid] <String>] [[-Forest] <String>] [[-ExcludeDomains] <String[]>]
|
||||
[[-IncludeDomains] <String[]>] [[-ExtendedForestInformation] <IDictionary>] [[-GPOPath] <String[]>]
|
||||
[-PermissionsOnly] [-OwnerOnly] [-Limited] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOGuid
|
||||
{{ Fill GPOGuid Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: GUID, GPOID
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOName
|
||||
{{ Fill GPOName Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOPath
|
||||
{{ Fill GPOPath Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 6
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Limited
|
||||
{{ Fill Limited Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -OwnerOnly
|
||||
{{ Fill OwnerOnly Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -PermissionsOnly
|
||||
{{ Fill PermissionsOnly Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -0,0 +1,60 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPoZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-GPOZaurrBackupInformation
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-GPOZaurrBackupInformation [[-BackupFolder] <String[]>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -BackupFolder
|
||||
{{ Fill BackupFolder Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -0,0 +1,152 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPoZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-GPOZaurrLink
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-GPOZaurrLink [[-ADObject] <ADObject[]>] [-Limited] [[-GPOCache] <IDictionary>] [[-Forest] <String>]
|
||||
[[-ExcludeDomains] <String[]>] [[-IncludeDomains] <String[]>] [[-ExtendedForestInformation] <IDictionary>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ADObject
|
||||
{{ Fill ADObject Description }}
|
||||
|
||||
```yaml
|
||||
Type: ADObject[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: True (ByPropertyName, ByValue)
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOCache
|
||||
{{ Fill GPOCache Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Limited
|
||||
{{ Fill Limited Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### Microsoft.ActiveDirectory.Management.ADObject[]
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -0,0 +1,121 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPoZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-GPOZaurrPassword
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-GPOZaurrPassword [[-Forest] <String>] [[-ExcludeDomains] <String[]>] [[-IncludeDomains] <String[]>]
|
||||
[[-ExtendedForestInformation] <IDictionary>] [[-GPOPath] <String[]>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOPath
|
||||
{{ Fill GPOPath Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -0,0 +1,280 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPoZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-GPOZaurrPermission
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### GPO (Default)
|
||||
```
|
||||
Get-GPOZaurrPermission [-Type <String[]>] [-SkipWellKnown] [-SkipAdministrative] [-ResolveAccounts]
|
||||
[-IncludeOwner] [-IncludePermissionType <GPPermissionType[]>] [-ExcludePermissionType <GPPermissionType[]>]
|
||||
[-IncludeGPOObject] [-Forest <String>] [-ExcludeDomains <String[]>] [-IncludeDomains <String[]>]
|
||||
[-ExtendedForestInformation <IDictionary>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
### GPOName
|
||||
```
|
||||
Get-GPOZaurrPermission [-GPOName <String>] [-Type <String[]>] [-SkipWellKnown] [-SkipAdministrative]
|
||||
[-ResolveAccounts] [-IncludeOwner] [-IncludePermissionType <GPPermissionType[]>]
|
||||
[-ExcludePermissionType <GPPermissionType[]>] [-IncludeGPOObject] [-Forest <String>]
|
||||
[-ExcludeDomains <String[]>] [-IncludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
### GPOGUID
|
||||
```
|
||||
Get-GPOZaurrPermission [-GPOGuid <String>] [-Type <String[]>] [-SkipWellKnown] [-SkipAdministrative]
|
||||
[-ResolveAccounts] [-IncludeOwner] [-IncludePermissionType <GPPermissionType[]>]
|
||||
[-ExcludePermissionType <GPPermissionType[]>] [-IncludeGPOObject] [-Forest <String>]
|
||||
[-ExcludeDomains <String[]>] [-IncludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludePermissionType
|
||||
{{ Fill ExcludePermissionType Description }}
|
||||
|
||||
```yaml
|
||||
Type: GPPermissionType[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Accepted values: None, GpoApply, GpoRead, GpoEdit, GpoEditDeleteModifySecurity, GpoCustom, WmiFilterEdit, WmiFilterFullControl, WmiFilterCustom, StarterGpoRead, StarterGpoEdit, StarterGpoFullControl, StarterGpoCustom, SomCreateWmiFilter, SomWmiFilterFullControl, SomCreateGpo, SomCreateStarterGpo, SomLogging, SomPlanning, SomLink
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOGuid
|
||||
{{ Fill GPOGuid Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: GPOGUID
|
||||
Aliases: GUID, GPOID
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOName
|
||||
{{ Fill GPOName Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: GPOName
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeGPOObject
|
||||
{{ Fill IncludeGPOObject Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeOwner
|
||||
{{ Fill IncludeOwner Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludePermissionType
|
||||
{{ Fill IncludePermissionType Description }}
|
||||
|
||||
```yaml
|
||||
Type: GPPermissionType[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Accepted values: None, GpoApply, GpoRead, GpoEdit, GpoEditDeleteModifySecurity, GpoCustom, WmiFilterEdit, WmiFilterFullControl, WmiFilterCustom, StarterGpoRead, StarterGpoEdit, StarterGpoFullControl, StarterGpoCustom, SomCreateWmiFilter, SomWmiFilterFullControl, SomCreateGpo, SomCreateStarterGpo, SomLogging, SomPlanning, SomLink
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ResolveAccounts
|
||||
{{ Fill ResolveAccounts Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkipAdministrative
|
||||
{{ Fill SkipAdministrative Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkipWellKnown
|
||||
{{ Fill SkipWellKnown Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
{{ Fill Type Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Accepted values: Unknown, All
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -0,0 +1,136 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPoZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Get-GPOZaurrWMI
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Get-GPOZaurrWMI [[-Guid] <Guid[]>] [[-Name] <String[]>] [[-Forest] <String>] [[-ExcludeDomains] <String[]>]
|
||||
[[-IncludeDomains] <String[]>] [[-ExtendedForestInformation] <IDictionary>] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Guid
|
||||
{{ Fill Guid Description }}
|
||||
|
||||
```yaml
|
||||
Type: Guid[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Name
|
||||
{{ Fill Name Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -0,0 +1,213 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPoZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# New-GPOZaurrWMI
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
New-GPOZaurrWMI [-Name] <String> [[-Description] <String>] [-Query] <String> [-SkipQueryCheck] [-Force]
|
||||
[[-Forest] <String>] [[-ExcludeDomains] <String[]>] [[-IncludeDomains] <String[]>]
|
||||
[[-ExtendedForestInformation] <IDictionary>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Description
|
||||
{{ Fill Description Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 6
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Force
|
||||
{{ Fill Force Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Name
|
||||
{{ Fill Name Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Query
|
||||
{{ Fill Query Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkipQueryCheck
|
||||
{{ Fill SkipQueryCheck Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -WhatIf
|
||||
Shows what would happen if the cmdlet runs.
|
||||
The cmdlet is not run.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: wi
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -0,0 +1,52 @@
|
||||
---
|
||||
Module Name: GPOZaurr
|
||||
Module Guid: f7d4c9e4-0298-4f51-ad77-e8e3febebbde
|
||||
Download Help Link: {{ Update Download Link }}
|
||||
Help Version: {{ Please enter version of help manually (X.X.X.X) format }}
|
||||
Locale: en-US
|
||||
---
|
||||
|
||||
# GPOZaurr Module
|
||||
## Description
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## GPOZaurr Cmdlets
|
||||
### [Backup-GPOZaurr](Backup-GPOZaurr.md)
|
||||
{{ Fill in the Description }}
|
||||
|
||||
### [Get-GPOZaurr](Get-GPOZaurr.md)
|
||||
{{ Fill in the Description }}
|
||||
|
||||
### [Get-GPOZaurrBackupInformation](Get-GPOZaurrBackupInformation.md)
|
||||
{{ Fill in the Description }}
|
||||
|
||||
### [Get-GPOZaurrLink](Get-GPOZaurrLink.md)
|
||||
{{ Fill in the Description }}
|
||||
|
||||
### [Get-GPOZaurrPassword](Get-GPOZaurrPassword.md)
|
||||
{{ Fill in the Description }}
|
||||
|
||||
### [Get-GPOZaurrPermission](Get-GPOZaurrPermission.md)
|
||||
{{ Fill in the Description }}
|
||||
|
||||
### [Get-GPOZaurrWMI](Get-GPOZaurrWMI.md)
|
||||
{{ Fill in the Description }}
|
||||
|
||||
### [New-GPOZaurrWMI](New-GPOZaurrWMI.md)
|
||||
{{ Fill in the Description }}
|
||||
|
||||
### [Remove-GPOZaurr](Remove-GPOZaurr.md)
|
||||
{{ Fill in the Description }}
|
||||
|
||||
### [Remove-GPOZaurrWMI](Remove-GPOZaurrWMI.md)
|
||||
{{ Fill in the Description }}
|
||||
|
||||
### [Restore-GPOZaurr](Restore-GPOZaurr.md)
|
||||
{{ Fill in the Description }}
|
||||
|
||||
### [Save-GPOZaurrFiles](Save-GPOZaurrFiles.md)
|
||||
{{ Fill in the Description }}
|
||||
|
||||
### [Set-GPOZaurrOwner](Set-GPOZaurrOwner.md)
|
||||
{{ Fill in the Description }}
|
||||
|
||||
@@ -0,0 +1,214 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPoZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Remove-GPOZaurr
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Remove-GPOZaurr [-Type] <String[]> [[-LimitProcessing] <Int32>] [[-Forest] <String>]
|
||||
[[-ExcludeDomains] <String[]>] [[-IncludeDomains] <String[]>] [[-ExtendedForestInformation] <IDictionary>]
|
||||
[[-GPOPath] <String[]>] [[-BackupPath] <String>] [-BackupDated] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -BackupDated
|
||||
{{ Fill BackupDated Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -BackupPath
|
||||
{{ Fill BackupPath Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 7
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOPath
|
||||
{{ Fill GPOPath Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 6
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -LimitProcessing
|
||||
{{ Fill LimitProcessing Description }}
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
{{ Fill Type Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
Accepted values: Empty, Unlinked
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -WhatIf
|
||||
Shows what would happen if the cmdlet runs.
|
||||
The cmdlet is not run.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: wi
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -0,0 +1,168 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPoZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Remove-GPOZaurrWMI
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Remove-GPOZaurrWMI [[-Guid] <Guid[]>] [[-Name] <String[]>] [[-Forest] <String>] [[-ExcludeDomains] <String[]>]
|
||||
[[-IncludeDomains] <String[]>] [[-ExtendedForestInformation] <IDictionary>] [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 5
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Guid
|
||||
{{ Fill Guid Description }}
|
||||
|
||||
```yaml
|
||||
Type: Guid[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Name
|
||||
{{ Fill Name Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -WhatIf
|
||||
Shows what would happen if the cmdlet runs.
|
||||
The cmdlet is not run.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: wi
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -0,0 +1,121 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPoZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Restore-GPOZaurr
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Restore-GPOZaurr [-BackupFolder] <String> [[-DisplayName] <String>] [[-NewDisplayName] <String>]
|
||||
[[-Domain] <String>] [-SkipBackupSummary] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -BackupFolder
|
||||
{{ Fill BackupFolder Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -DisplayName
|
||||
{{ Fill DisplayName Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: Name
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Domain
|
||||
{{ Fill Domain Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -NewDisplayName
|
||||
{{ Fill NewDisplayName Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -SkipBackupSummary
|
||||
{{ Fill SkipBackupSummary Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -0,0 +1,136 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPoZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Save-GPOZaurrFiles
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
```
|
||||
Save-GPOZaurrFiles [[-Forest] <String>] [[-ExcludeDomains] <String[]>] [[-IncludeDomains] <String[]>]
|
||||
[[-ExtendedForestInformation] <IDictionary>] [[-GPOPath] <String[]>] [-DeleteExisting] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -DeleteExisting
|
||||
{{ Fill DeleteExisting Description }}
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 1
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 3
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: 0
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOPath
|
||||
{{ Fill GPOPath Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: 4
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: 2
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -0,0 +1,222 @@
|
||||
---
|
||||
external help file: GPOZaurr-help.xml
|
||||
Module Name: GPoZaurr
|
||||
online version:
|
||||
schema: 2.0.0
|
||||
---
|
||||
|
||||
# Set-GPOZaurrOwner
|
||||
|
||||
## SYNOPSIS
|
||||
{{ Fill in the Synopsis }}
|
||||
|
||||
## SYNTAX
|
||||
|
||||
### Type (Default)
|
||||
```
|
||||
Set-GPOZaurrOwner -Type <String[]> [-Forest <String>] [-ExcludeDomains <String[]>] [-IncludeDomains <String[]>]
|
||||
[-ExtendedForestInformation <IDictionary>] [-LimitProcessing <Int32>] [-WhatIf] [-Confirm]
|
||||
[<CommonParameters>]
|
||||
```
|
||||
|
||||
### Named
|
||||
```
|
||||
Set-GPOZaurrOwner [-GPOName <String>] [-GPOGuid <String>] [-Forest <String>] [-ExcludeDomains <String[]>]
|
||||
[-IncludeDomains <String[]>] [-ExtendedForestInformation <IDictionary>] -Principal <String>
|
||||
[-LimitProcessing <Int32>] [-WhatIf] [-Confirm] [<CommonParameters>]
|
||||
```
|
||||
|
||||
## DESCRIPTION
|
||||
{{ Fill in the Description }}
|
||||
|
||||
## EXAMPLES
|
||||
|
||||
### Example 1
|
||||
```powershell
|
||||
PS C:\> {{ Add example code here }}
|
||||
```
|
||||
|
||||
{{ Add example description here }}
|
||||
|
||||
## PARAMETERS
|
||||
|
||||
### -Confirm
|
||||
Prompts you for confirmation before running the cmdlet.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: cf
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExcludeDomains
|
||||
{{ Fill ExcludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -ExtendedForestInformation
|
||||
{{ Fill ExtendedForestInformation Description }}
|
||||
|
||||
```yaml
|
||||
Type: IDictionary
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Forest
|
||||
{{ Fill Forest Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: (All)
|
||||
Aliases: ForestName
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOGuid
|
||||
{{ Fill GPOGuid Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Named
|
||||
Aliases: GUID, GPOID
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -GPOName
|
||||
{{ Fill GPOName Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Named
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -IncludeDomains
|
||||
{{ Fill IncludeDomains Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: (All)
|
||||
Aliases: Domain, Domains
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -LimitProcessing
|
||||
{{ Fill LimitProcessing Description }}
|
||||
|
||||
```yaml
|
||||
Type: Int32
|
||||
Parameter Sets: (All)
|
||||
Aliases:
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Principal
|
||||
{{ Fill Principal Description }}
|
||||
|
||||
```yaml
|
||||
Type: String
|
||||
Parameter Sets: Named
|
||||
Aliases:
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -Type
|
||||
{{ Fill Type Description }}
|
||||
|
||||
```yaml
|
||||
Type: String[]
|
||||
Parameter Sets: Type
|
||||
Aliases:
|
||||
Accepted values: EmptyOrUnknown, NotAdministrative
|
||||
|
||||
Required: True
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### -WhatIf
|
||||
Shows what would happen if the cmdlet runs.
|
||||
The cmdlet is not run.
|
||||
|
||||
```yaml
|
||||
Type: SwitchParameter
|
||||
Parameter Sets: (All)
|
||||
Aliases: wi
|
||||
|
||||
Required: False
|
||||
Position: Named
|
||||
Default value: None
|
||||
Accept pipeline input: False
|
||||
Accept wildcard characters: False
|
||||
```
|
||||
|
||||
### CommonParameters
|
||||
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](http://go.microsoft.com/fwlink/?LinkID=113216).
|
||||
|
||||
## INPUTS
|
||||
|
||||
### None
|
||||
|
||||
## OUTPUTS
|
||||
|
||||
### System.Object
|
||||
## NOTES
|
||||
|
||||
## RELATED LINKS
|
||||
@@ -2,4 +2,4 @@
|
||||
|
||||
# Remove GPOS
|
||||
$BackupPath = "$Env:UserProfile\Desktop\GPO"
|
||||
Remove-GPOZaurr -Type Empty -BackupPath $BackupPath -BackupDated -LimitProcessing 2 -Verbose
|
||||
Remove-GPOZaurr -Type Empty, Unlinked -BackupPath $BackupPath -BackupDated -LimitProcessing 2 -Verbose -WhatIf
|
||||
@@ -1,6 +1,6 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$RestoreFrom = 'C:\Users\przemyslaw.klys\Desktop\GPO\2020-04-12_10_11_24'
|
||||
$RestoreFrom = 'C:\Users\przemyslaw.klys\Desktop\GPO\2020-04-26_10_29_34'
|
||||
|
||||
$BackupInformation = Get-GPOZaurrBackupInformation -BackupFolder $RestoreFrom
|
||||
$BackupInformation | Format-Table -a
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$GPOS = Get-GPOZaurr
|
||||
$GPOS | Format-Table -AutoSize
|
||||
$GPOS | Format-Table -AutoSize *
|
||||
|
||||
$GPOS[0] | Format-List
|
||||
|
||||
@@ -9,4 +9,4 @@ $GPOs[0].ACL | Format-Table -AutoSize
|
||||
|
||||
$GPOs.Links | Format-Table -AutoSize
|
||||
|
||||
$GPOS | Format-Table -AutoSize Name, WmiFilter, WMIDescription
|
||||
$GPOS | Format-Table -AutoSize DisplayName, WmiFilter, WMIDescription
|
||||
@@ -0,0 +1,3 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrWMI -Name 'Test - Dual Filter' | Format-Table -AutoSize *
|
||||
@@ -1,7 +1,7 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
#$T = Get-GPOZaurrPermission -GPOName 'DC | PowerShell Logging' -Type Unknown
|
||||
$T = Get-GPOZaurrPermission -GPOName 'DC | PowerShell Logging' -Type Unknown
|
||||
|
||||
$T = Get-GPOZaurrPermission -ResolveAccounts -IncludeOwner #-ExcludePermissionType GpoRead,GpoApply #-Type All #-SkipWellKnown -SkipAdministrative # -ExcludePermissionType GpoRead,GpoApply #| Out-HtmlView
|
||||
#$T = Get-GPOZaurrPermission -ResolveAccounts -IncludeOwner #-ExcludePermissionType GpoRead,GpoApply #-Type All #-SkipWellKnown -SkipAdministrative # -ExcludePermissionType GpoRead,GpoApply #| Out-HtmlView
|
||||
$T | Format-Table -AutoSize *
|
||||
$T | Out-HtmlView -ScrollX -Filtering -Online -DisablePaging
|
||||
#$T | Out-HtmlView -ScrollX -Filtering -Online -DisablePaging
|
||||
@@ -0,0 +1,4 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$T = Get-GPOZaurrPermission -GPOName 'Default Domain Policy' -Type 'All'
|
||||
$T | Format-Table *
|
||||
@@ -0,0 +1,12 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$T = Get-GPOZaurrPermission -GPOName 'Default DOmain Policy' #-Principal 'marikegerard' -PrincipalType Name # #-ExcludePermissionType GpoApply,GpoRead -IncludeGPOObject
|
||||
$T | Format-Table -AutoSize *
|
||||
$T = Get-GPOZaurrPermission -GPOName 'Default DOmain Policy' -Principal 'marikegerard' -PrincipalType Name # #-ExcludePermissionType GpoApply,GpoRead -IncludeGPOObject
|
||||
$T | Format-Table -AutoSize *
|
||||
$T = Get-GPOZaurrPermission -GPOName 'Default DOmain Policy' -Principal 'EVOTEC\marikegerard' -PrincipalType Name # #-ExcludePermissionType GpoApply,GpoRead -IncludeGPOObject
|
||||
$T | Format-Table -AutoSize *
|
||||
$T = Get-GPOZaurrPermission -GPOName 'Default DOmain Policy' -Principal 'S-1-5-18' -PrincipalType Sid # #-ExcludePermissionType GpoApply,GpoRead -IncludeGPOObject
|
||||
$T | Format-Table -AutoSize *
|
||||
$T = Get-GPOZaurrPermission -GPOName 'Default DOmain Policy' -Principal 'CN=Enterprise Admins,CN=Users,DC=ad,DC=evotec,DC=xyz' -PrincipalType DistinguishedName # #-ExcludePermissionType GpoApply,GpoRead -IncludeGPOObject
|
||||
$T | Format-Table -AutoSize *
|
||||
@@ -0,0 +1,4 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$T = Get-GPOZaurrPermission -Type Unknown -Verbose
|
||||
$T | Format-Table *
|
||||
@@ -1,3 +1,3 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Remove-GPOZaurrPermission -Verbose -Type Unknown -WhatIf
|
||||
#Clear-Host
|
||||
Remove-GPOZaurrPermission -Verbose -Type Unknown -LimitProcessing 1 #-WhatIf
|
||||
@@ -0,0 +1,19 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# Step 1 - Create report
|
||||
$Report = Get-GPOZaurrPermission -Type All
|
||||
$Report | ConvertTo-Excel -FilePath $Env:UserProfile\Desktop\GPOOutput.xlsx -ExcelWorkSheetName 'GPO Permissions Before' -AutoFilter -AutoFit
|
||||
|
||||
# Step 2 - Verify couple of GPOS returned with whatif
|
||||
#Remove-GPOZaurrPermission -Verbose -Type Unknown -LimitProcessing 4 -WhatIf
|
||||
|
||||
# Step 3 - Confirm the change without whatif
|
||||
#Remove-GPOZaurrPermission -Verbose -Type Unknown -LimitProcessing 4
|
||||
|
||||
# Step 4 - Analyze GPO manually to confirm only unknown sids were removed
|
||||
|
||||
# Step 5 - if everything went ok, continue process without whatif
|
||||
|
||||
# Step-6 - Generate new report
|
||||
#$Report = Get-GPOZaurrPermission -Type All
|
||||
#$Report | ConvertTo-Excel -FilePath $Env:UserProfile\Desktop\GPOOutput.xlsx -ExcelWorkSheetName 'GPO Permissions After' -AutoFilter -AutoFit
|
||||
@@ -1,13 +1,6 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$Named = @(
|
||||
'S-1-5-21-853615985-2870445339-3163598659-1105'
|
||||
)
|
||||
$T = Get-GPOZaurrPermission -GPOName 'Default DOmain Policy'
|
||||
$T | Format-Table -AutoSize *
|
||||
|
||||
# Using exclude permission types (it may not be good idea to delete GPORead/GPOApply)
|
||||
#Remove-GPOZaurrPermission -Verbose -Type Named -WhatIf -LimitProcessing 2 -NamedObjects $Named -ExcludePermissionType GpoRead,GpoApply
|
||||
|
||||
# But
|
||||
#Remove-GPOZaurrPermission -Type Named -NamedObjects $Named -IncludePermissionType GpoEditDeleteModifySecurity -SkipWellKnown -SkipAdministrative -Verbose -WhatIf
|
||||
|
||||
Remove-GPOZaurrPermission -Type Named -NamedObjects $Named -SkipWellKnown -SkipAdministrative -Verbose #-WhatIf
|
||||
Remove-GPOZaurrPermission -GPOName 'Default DOmain Policy' -Principal 'S-1-5-21-853615985-2870445339-3163598659-3755' -Verbose #-WhatIf #-IncludePermissionType GpoApply #-WhatIf
|
||||
@@ -0,0 +1,6 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrAD | Format-Table
|
||||
Get-GPOZaurrAD -Forest 'test.evotec.pl' | Format-Table
|
||||
|
||||
Get-GPOZaurrAD -GPOName 'Default Domain Policy' -IncludeDomains 'ad.evotec.pl' | Format-Table
|
||||
@@ -0,0 +1,4 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$GPOS = Get-GPOZaurr
|
||||
$GPOS | Format-Table -AutoSize
|
||||
@@ -1,13 +1,17 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# This Example shows how to deal with GPOs that have owner that doesn't exists anymore (deleted userr or diff domain) - EmptyOrUnknown
|
||||
# And also can fix at the same time NonAdministrative - this basically looks for users/groups that are not Domain Admins or Enterprise Admins
|
||||
# And also can fix at the same time NotAdministrative - this basically looks for users/groups that are not Domain Admins or Enterprise Admins
|
||||
# regardless if current user is still Domain Admin or not
|
||||
|
||||
$GPOs = Get-GPOZaurr #-GPOName 'New Group Policy Object'
|
||||
$GPOs | Format-Table DisplayName, Owner, OwnerSID
|
||||
$GPOs = Get-GPOZaurrOwner -IncludeSysvol #-GPOName
|
||||
$GPOs | Format-Table DisplayName, Owner, OwnerSID, OwnerType, SysvolOwner, SysvolSID, SysvolType
|
||||
|
||||
Set-GPOZaurrOwner -Type 'NonAdministrative','EmptyOrUnknown' -Verbose -LimitProcessing 3 #-WhatIf
|
||||
#Set-GPOZaurrOwner -Type Unknown -Verbose #-LimitProcessing 2 -WhatIf
|
||||
Set-GPOZaurrOwner -Type NotAdministrative -Verbose -LimitProcessing 2 -WhatIf
|
||||
#Set-GPOZaurrOwner -Type NotMatching -Verbose -LimitProcessing 2 -WhatIf
|
||||
|
||||
$GPOs = Get-GPOZaurr #-GPOName 'New Group Policy Object'
|
||||
$GPOs | Format-Table DisplayName, Owner, OwnerSID
|
||||
#Set-GPOZaurrOwner -GPOName 'COMPUTERS | Enable Sets' -Verbose -Principal 'przemyslaw.klys' -WhatIf #-SkipSysvol
|
||||
#Set-GPOZaurrOwner -GPOName 'New Group Policy Object' -Verbose #-WhatIf #-SkipSysvol
|
||||
#$GPOs = Get-GPOZaurrOwner -IncludeSysvol #-GPOName 'New Group Policy Object'
|
||||
#$GPOs | Format-Table DisplayName, Owner, OwnerSID
|
||||
+1
@@ -1,5 +1,6 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# You can set owner per guid if you want to have more control.
|
||||
$LImitProcessing = 2
|
||||
|
||||
# check what is there now
|
||||
@@ -0,0 +1,15 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# this example shows how to replace owner of a single GPO
|
||||
|
||||
$GPOs = Get-GPOZaurr #-GPOName 'New Group Policy Object'
|
||||
$GPOs | Format-Table DisplayName, Owner, OwnerSID, OwnerType
|
||||
|
||||
# If Principal is not provided Domain Admins are set as default principal
|
||||
Set-GPOZaurrOwner -GPOName 'ALL | Enable RDP' -WhatIf
|
||||
|
||||
# If principal is given it is set (of course if it exits). Otherwise warning is returned.
|
||||
Set-GPOZaurrOwner -GPOName 'ALL | Enable RDP' -Principal 'przemyslaw.klys' #-WhatIf
|
||||
|
||||
$GPOs = Get-GPOZaurr #-GPOName 'New Group Policy Object'
|
||||
$GPOs | Format-Table DisplayName, Owner, OwnerSID, OwnerType
|
||||
@@ -0,0 +1,12 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# Step 1 - Create report
|
||||
$Report = Get-GPOZaurrOwner -IncludeSysvol
|
||||
$Report | ConvertTo-Excel -FilePath $Env:UserProfile\Desktop\GPOOwners.xlsx -ExcelWorkSheetName 'GPO Owners Before' -AutoFilter -AutoFit
|
||||
|
||||
# Step 2 - Fix owners / use WhatIf and LimitProcessing / verify changes before/after
|
||||
Set-GPOZaurrOwner -Type NotAdministrative -Verbose -LimitProcessing 2 -WhatIf
|
||||
|
||||
# Step 3
|
||||
$Report = Get-GPOZaurrOwner -IncludeSysvol
|
||||
$Report | ConvertTo-Excel -FilePath $Env:UserProfile\Desktop\GPOOwners.xlsx -ExcelWorkSheetName 'GPO Owners After' -AutoFilter -AutoFit
|
||||
@@ -0,0 +1,11 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$T = Get-GPOZaurrOwner -Verbose -IncludeSysvol
|
||||
$T | Format-Table *
|
||||
#$T | Out-HtmlView -ScrollX
|
||||
|
||||
$T = Get-GPOZaurrOwner -Verbose -IncludeSysvol -GPOName 'Default Domain Policy'
|
||||
$T | Format-Table *
|
||||
|
||||
$T = Get-GPOZaurrOwner -Verbose -IncludeSysvol -GPOGuid '4E1F9C70-1DDB-4AB6-BBA3-14A8E07F0B4B'
|
||||
$T | Format-Table *
|
||||
@@ -0,0 +1,3 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrLink | Format-Table -AutoSize *
|
||||
@@ -0,0 +1,7 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrLink -SearchBase 'OU=Domain Controllers,DC=ad,DC=evotec,DC=xyz' | Format-Table -AutoSize
|
||||
|
||||
Get-GPOZaurrLink -SearchBase 'OU=Computers,OU=Production,DC=ad,DC=evotec,DC=xyz' | Format-Table -AutoSize
|
||||
|
||||
Get-GPOZaurrLink -SearchBase 'DC=ad,DC=evotec,DC=xyz' -SearchScope Base | Format-Table -AutoSize
|
||||
@@ -0,0 +1,6 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-ADOrganizationalUnit -Filter * -Properties distinguishedName, LinkedGroupPolicyObjects | Get-GPOZaurrLink | Format-Table
|
||||
Get-ADOrganizationalUnit -Filter * -Properties canonicalname, distinguishedName, LinkedGroupPolicyObjects | Get-GPOZaurrLink | Format-Table
|
||||
Get-ADObject -Filter * -Properties distinguishedName, gplink -Server 'ad.evotec.pl' | Get-GPOZaurrLink | Format-Table -AutoSize
|
||||
Get-GPOZaurrLink | Format-Table -AutoSize
|
||||
@@ -0,0 +1,3 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrLink -Linked 'Root' -IncludeDomains 'ad.evotec.pl' | Format-Table
|
||||
@@ -0,0 +1,5 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrLink -SearchBase "OU=ITR01,DC=ad,DC=evotec,DC=xyz" -Verbose | Format-Table -a *
|
||||
|
||||
Get-GPOZaurrLink -SearchBase "OU=ITR01,DC=ad,DC=evotec,DC=xyz" -SkipDuplicates | Format-Table -a *
|
||||
@@ -0,0 +1,11 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Clear-Host
|
||||
|
||||
Get-GPOZaurrLink -Linked Root | Format-Table -AutoSize
|
||||
|
||||
Get-GPOZaurrLink -Linked Site | Format-Table -AutoSize
|
||||
|
||||
Get-GPOZaurrLink -Linked DomainControllers | Format-Table -AutoSize
|
||||
|
||||
Get-GPOZaurrLink -Linked Other | Format-Table -AutoSize
|
||||
@@ -0,0 +1,3 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrLink | Format-Table -AutoSize
|
||||
@@ -0,0 +1,17 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Clear-Host
|
||||
|
||||
$T = Get-GPOZaurrPermission -GPOName 'ALL | Enable RDP' #-IncludeGPOObject #-ExcludePermissionType GpoApply,GpoRead -IncludeGPOObject
|
||||
$T | Format-Table -AutoSize *
|
||||
|
||||
Add-GPOZaurrPermission -GPOName 'ALL | Enable RDP' -PermissionType GpoEdit -Principal 'przemyslaw.klys' -Verbose
|
||||
|
||||
$T = Get-GPOZaurrPermission -GPOName 'ALL | Enable RDP' #-ExcludePermissionType GpoApply,GpoRead -IncludeGPOObject
|
||||
$T | Format-Table -AutoSize *
|
||||
|
||||
Add-GPOZaurrPermission -GPOName 'ALL | Enable RDP' -PermissionType GpoEditDeleteModifySecurity -Principal 'Domain Admins' -Verbose
|
||||
Remove-GPOZaurrPermission -GPOName 'ALL | Enable RDP' -PermissionType GpoEdit -Principal 'przemyslaw.klys' -PrincipalType Name -Verbose
|
||||
|
||||
$T = Get-GPOZaurrPermission -GPOName 'ALL | Enable RDP' #-ExcludePermissionType GpoApply,GpoRead -IncludeGPOObject
|
||||
$T | Format-Table -AutoSize *
|
||||
@@ -0,0 +1,38 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Clear-Host
|
||||
|
||||
$GPOName = 'ALL | Enable RDP'
|
||||
|
||||
$T = Get-GPOZaurrPermission -GPOName $GPOName -IncludePermissionType GpoEditDeleteModifySecurity -PermitType Allow -Principal 'Domain Admins' -PrincipalType 'Name'
|
||||
$T | Format-Table *
|
||||
|
||||
<#
|
||||
# this will go and check for both Domain Admins / Enterprise Admins - if found won't do anything
|
||||
Add-GPOZaurrPermission -GPOName $GPOName -PermissionType GpoEditDeleteModifySecurity -Type Administrative -Verbose
|
||||
# this will go thru, because PrincipalType is not set to look by Name. Be precise with what you ask for
|
||||
Add-GPOZaurrPermission -GPOName $GPOName -PermissionType GpoEditDeleteModifySecurity -Principal 'Domain Admins' -Verbose
|
||||
# this will be detected as already existing
|
||||
Add-GPOZaurrPermission -GPOName $GPOName -PermissionType GpoEditDeleteModifySecurity -Principal 'Domain Admins' -PrincipalType Name -Verbose
|
||||
# this will be added only if it doesn't exists - assuming that przemyslaw.klys is displayed in Get-GPOZaurrPermissions
|
||||
Add-GPOZaurrPermission -GPOName $GPOName -PermissionType GpoApply -Principal 'przemyslaw.klys' -PrincipalType Name -Verbose
|
||||
# this will be added only if it doesn't exists - assuming that przemyslaw.klys is displayed in Get-GPOZaurrPermissions
|
||||
Add-GPOZaurrPermission -GPOName $GPOName -PermissionType GpoEditDeleteModifySecurity -Principal 'przemyslaw.klys' -PrincipalType Name -Verbose
|
||||
# this will ADD system if it doesn't eists
|
||||
Add-GPOZaurrPermission -GPOName $GPOName -PermissionType GpoEditDeleteModifySecurity -Type WellKnownAdministrative -Verbose
|
||||
|
||||
Add-GPOZaurrPermission -GPOName $GPOName -PermissionType GpoApply -Principal 'przemyslaw.klys' -Verbose
|
||||
Add-GPOZaurrPermission -GPOName $GPOName -PermissionType GpoEditDeleteModifySecurity -Principal 'przemyslaw.klys' -Verbose
|
||||
# this will not work because we already have GPOEditDeleteModifySecurity which is higher than GpoEDIT
|
||||
Add-GPOZaurrPermission -GPOName $GPOName -PermissionType GpoEdit -Principal 'przemyslaw.klys' -Verbose
|
||||
#>
|
||||
Add-GPOZaurrPermission -GPOName $GPOName -Type AuthenticatedUsers -PermissionType GpoRead -Verbose #-WhatIf
|
||||
|
||||
#$T = Get-GPOZaurrPermission -GPOName $GPOName #-ExcludePermissionType GpoApply,GpoRead -IncludeGPOObject
|
||||
#$T | Format-Table -AutoSize *
|
||||
|
||||
#Remove-GPOZaurrPermission -GPOName $GPOName -PermissionType GpoApply -Principal 'przemyslaw.klys' -PrincipalType Name -Verbose
|
||||
|
||||
#$T = Get-GPOZaurrPermission -GPOName $GPOName #-ExcludePermissionType GpoApply,GpoRead -IncludeGPOObject
|
||||
#$T = Get-GPOZaurrPermission -GPOName $GPOName #-ExcludePermissionType GpoApply,GpoRead -IncludeGPOObject
|
||||
#$T | Format-Table -AutoSize *
|
||||
@@ -0,0 +1,12 @@
|
||||
#Clear-Host
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Invoke-GPOZaurrPermission -Linked Root -Verbose {
|
||||
Set-GPOOwner -Type Administrative
|
||||
#Set-GPOOwner -Principal 'EVOTEC\Enterprise Admins'
|
||||
#Set-GPOOwner -Principal 'Domain Admins'
|
||||
Remove-GPOPermission -Type Administrative -IncludePermissionType GPOCustom
|
||||
Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity
|
||||
Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity
|
||||
#Add-GPOPermission -Type WellKnownAdministrative -IncludePermissionType GpoEditDeleteModifySecurity
|
||||
} #-WhatIf #| Format-Table *
|
||||
@@ -0,0 +1,11 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Invoke-GPOZaurrPermission -Verbose -SearchBase 'OU=Computers,OU=Production,DC=ad,DC=evotec,DC=xyz' {
|
||||
Set-GPOOwner -Type Administrative
|
||||
#Set-GPOOwner -Principal 'EVOTEC\Enterprise Admins'
|
||||
#Set-GPOOwner -Principal 'Domain Admins'
|
||||
#Remove-GPOPermission -Type Administrative -IncludePermissionType GPOCustom
|
||||
Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity
|
||||
#Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity
|
||||
#Add-GPOPermission -Type WellKnownAdministrative -IncludePermissionType GpoEditDeleteModifySecurity
|
||||
} -WhatIf #| Format-Table *
|
||||
@@ -0,0 +1,42 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# Apply permissions for ROOT
|
||||
Invoke-GPOZaurrPermission -Verbose -Linked Root -IncludeDomains 'ad.evotec.xyz' {
|
||||
Set-GPOOwner -Type Administrative
|
||||
Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type AuthenticatedUsers -IncludePermissionType GpoRead -PermitType Allow
|
||||
} -WhatIf
|
||||
|
||||
# Apply perrmissions for Domain Controllers
|
||||
Invoke-GPOZaurrPermission -Verbose -Linked DomainControllers -IncludeDomains 'ad.evotec.xyz' {
|
||||
Set-GPOOwner -Type Administrative
|
||||
Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type AuthenticatedUsers -IncludePermissionType GpoRead -PermitType Allow
|
||||
} -WhatIf
|
||||
|
||||
# Apply permissions for Regions, with exclusions for those 4 groups
|
||||
$Exclude = @(
|
||||
'CN=ITR01_AD Admins,OU=Security,OU=Groups,OU=Production,DC=ad,DC=evotec,DC=xyz'
|
||||
)
|
||||
|
||||
Invoke-GPOZaurrPermission -Verbose -SearchBase 'OU=ITR01,DC=ad,DC=evotec,DC=xyz' {
|
||||
Set-GPOOwner -Type Administrative
|
||||
Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity -PermitType Allow -ExcludePrincipal $Exclude -ExcludePrincipalType DistinguishedName
|
||||
Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type AuthenticatedUsers -IncludePermissionType GpoRead -PermitType Allow
|
||||
} -WhatIf
|
||||
|
||||
$Exclude = @(
|
||||
'CN=ITR02_AD Admins,OU=Security,OU=Groups,OU=Production,DC=ad,DC=evotec,DC=xyz'
|
||||
#'CN=ITR03_AD Admins,OU=Security,OU=Groups,OU=Production,DC=ad,DC=evotec,DC=xyz'
|
||||
#'CN=ITR04_AD Admins,OU=Security,OU=Groups,OU=Production,DC=ad,DC=evotec,DC=xyz'
|
||||
)
|
||||
|
||||
Invoke-GPOZaurrPermission -Verbose -SearchBase 'OU=ITR02,DC=ad,DC=evotec,DC=xyz' {
|
||||
Set-GPOOwner -Type Administrative
|
||||
Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity -PermitType Allow -ExcludePrincipal $Exclude -ExcludePrincipalType DistinguishedName
|
||||
Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type AuthenticatedUsers -IncludePermissionType GpoRead -PermitType Allow
|
||||
} -WhatIf
|
||||
@@ -0,0 +1,44 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# Apply permissions for ROOT
|
||||
Invoke-GPOZaurrPermission -Verbose -Linked Root -IncludeDomains 'ad.evotec.pl' {
|
||||
Set-GPOOwner -Type Administrative
|
||||
Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type AuthenticatedUsers -IncludePermissionType GpoRead -PermitType Allow
|
||||
} -WhatIf -SkipDuplicates
|
||||
|
||||
|
||||
# Apply perrmissions for Domain Controllers
|
||||
Invoke-GPOZaurrPermission -Verbose -Linked DomainControllers -IncludeDomains 'ad.evotec.xyz' {
|
||||
Set-GPOOwner -Type Administrative
|
||||
Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type AuthenticatedUsers -IncludePermissionType GpoRead -PermitType Allow
|
||||
} -WhatIf -SkipDuplicates
|
||||
|
||||
# Apply permissions for Regions, with exclusions for those 4 groups
|
||||
$Exclude = @(
|
||||
'CN=ITR01_AD Admins,OU=Security,OU=Groups,OU=Production,DC=ad,DC=evotec,DC=xyz'
|
||||
)
|
||||
|
||||
Invoke-GPOZaurrPermission -Verbose -SearchBase 'OU=ITR01,DC=ad,DC=evotec,DC=xyz' {
|
||||
Set-GPOOwner -Type Administrative
|
||||
Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity -PermitType Allow -ExcludePrincipal $Exclude -ExcludePrincipalType DistinguishedName
|
||||
Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type AuthenticatedUsers -IncludePermissionType GpoRead -PermitType Allow
|
||||
} -WhatIf -SkipDuplicates
|
||||
|
||||
|
||||
$Exclude = @(
|
||||
'CN=ITR02_AD Admins,OU=Security,OU=Groups,OU=Production,DC=ad,DC=evotec,DC=xyz'
|
||||
#'CN=ITR03_AD Admins,OU=Security,OU=Groups,OU=Production,DC=ad,DC=evotec,DC=xyz'
|
||||
#'CN=ITR04_AD Admins,OU=Security,OU=Groups,OU=Production,DC=ad,DC=evotec,DC=xyz'
|
||||
)
|
||||
|
||||
Invoke-GPOZaurrPermission -Verbose -SearchBase 'OU=ITR02,DC=ad,DC=evotec,DC=xyz' {
|
||||
Set-GPOOwner -Type Administrative
|
||||
Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity -PermitType Allow -ExcludePrincipal $Exclude -ExcludePrincipalType DistinguishedName
|
||||
Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type AuthenticatedUsers -IncludePermissionType GpoRead -PermitType Allow
|
||||
} -WhatIf -SkipDuplicates
|
||||
@@ -0,0 +1,9 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# This is a bit special - I would read blog post before running this
|
||||
Invoke-GPOZaurrPermission -Verbose -Level 1 -Limit 1 {
|
||||
Set-GPOOwner -Type Administrative
|
||||
Remove-GPOPermission -Type NotAdministrative, NotWellKnownAdministrative -IncludePermissionType GpoEdit, GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type Administrative -IncludePermissionType GpoEditDeleteModifySecurity -PermitType Allow
|
||||
Add-GPOPermission -Type AuthenticatedUsers -IncludePermissionType GpoRead -PermitType Allow
|
||||
} -WhatIf
|
||||
@@ -0,0 +1,4 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
#Get-GPOZaurrPermissionConsistency -Type All -Forest 'test.evotec.pl' | Format-Table
|
||||
Get-GPOZaurrPermissionConsistency -Type All | Format-Table
|
||||
@@ -0,0 +1,5 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrPermissionConsistency -GPOName 'Default Domain Controllers Policy' -IncludeDomains 'ad.evotec.xyz'
|
||||
|
||||
Repair-GPOZaurrPermissionConsistency -GPOName 'Default Domain Controllers Policy' -IncludeDomains 'ad.evotec.xyz' -Verbose #-WhatIf -Verbose
|
||||
@@ -0,0 +1,5 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrPermissionConsistency -Type All | Format-Table
|
||||
|
||||
Repair-GPOZaurrPermissionConsistency -LimitProcessing 2 -WhatIf -Verbose
|
||||
@@ -0,0 +1,9 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
#Get-GPOZaurrPermissionConsistency -Type All -Forest 'test.evotec.pl' | Format-Table
|
||||
|
||||
$Output = Get-GPOZaurrPermissionConsistency -GPOName 'Default Domain Controllers Policy' -IncludeDomains 'ad.evotec.xyz' -VerifyInheritance
|
||||
$Output | Format-Table DisplayName, DomainName, ACLConsistent, ACLConsistentInside
|
||||
$Output.ACLConsistentInsideDetails | Format-Table
|
||||
|
||||
$Output = Get-GPOZaurrPermissionConsistency -VerifyInheritance -Type 'All'
|
||||
$Output | Format-Table
|
||||
@@ -0,0 +1,3 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrSysvol -Verbose | Format-Table
|
||||
@@ -0,0 +1,3 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrSysvol -VerifyDomainControllers -Verbose | Format-Table *
|
||||
@@ -0,0 +1,7 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# this allows you to process X amount of orphaned folders/files (good for testing)
|
||||
Remove-GPOZaurrOrphanedSysvolFolders -Verbose -WhatIf -LimitProcessing 2 -IncludeDomains 'ad.evotec.xyz'
|
||||
|
||||
# this runs for whole SYSVOL and checks things against GPOS
|
||||
Remove-GPOZaurrOrphanedSysvolFolders -Verbose -IncludeDomains 'ad.evotec.xyz' -BackupPath $Env:UserProfile\Desktop\MyBackup1 #-WhatIf
|
||||
@@ -0,0 +1,3 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrLegacyFiles | Format-Table -AutoSize
|
||||
@@ -0,0 +1,3 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Remove-GPOZaurrLegacyFiles -Verbose -BackupPath $Env:USERPROFILE\Desktop\BackupADM1 -BackupDated -RemoveEmptyFolders -WhatIf -LimitProcessing 2
|
||||
@@ -0,0 +1,14 @@
|
||||
Clear-Host
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
#Get-GPOZaurrLinkSummary | Format-Table *
|
||||
#Get-GPOZaurrLinkSummary -UnlimitedProperties | Format-Table *
|
||||
#Get-GPOZaurrLinkSummary -Report 'MultipleLinks' -UnlimitedProperties | Format-Table *
|
||||
#Get-GPOZaurrLinkSummary -Report 'OneLink' -UnlimitedProperties | Format-Table *
|
||||
#Get-GPOZaurrLinkSummary -Report 'LinksSummary' -UnlimitedProperties | Format-Table *
|
||||
|
||||
$Report = Get-GPOZaurrLinkSummary #-UnlimitedProperties
|
||||
$Report | Format-Table *
|
||||
$Report.MultipleLinks | Format-Table *
|
||||
$Report.OneLink | Format-Table *
|
||||
$Report.LinksSummary | Format-Table *
|
||||
@@ -0,0 +1,12 @@
|
||||
Clear-Host
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$Report = Get-GPOZaurrLinkSummary -Report OneLink
|
||||
$Report | Format-Table
|
||||
$AffectedGPOs = foreach ($GPO in $Report) {
|
||||
if ($GPO.Level1 -gt 1) {
|
||||
$GPO
|
||||
}
|
||||
}
|
||||
|
||||
$AffectedGPOs | Format-Table *
|
||||
@@ -0,0 +1,6 @@
|
||||
Clear-Host
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Get-GPOZaurrFiles -Type All | Out-HtmlView -ScrollX -Filtering -AllProperties
|
||||
Get-GPOZaurrFiles -HashAlgorithm MD5 | Select-Object -First 2 | ConvertTo-Excel -FilePath $Env:USERPROFILE\Desktop\GPOListFiles.xlsx -AllProperties -ExcelWorkSheetName 'Files Just 2' -AutoFilter -AutoFit #-OpenWorkBook
|
||||
Get-GPOZaurrFiles -Type All -HashAlgorithm SHA256 | ConvertTo-Excel -FilePath $Env:USERPROFILE\Desktop\GPOListFiles.xlsx -AllProperties -ExcelWorkSheetName 'Files All' -AutoFilter -AutoFit #-OpenWorkBook
|
||||
@@ -0,0 +1,6 @@
|
||||
Clear-Host
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$Dictionary = Get-GPOZaurrDictionary #-Splitter '; '
|
||||
$Dictionary | Format-Table
|
||||
$Dictionary | Out-HtmlView
|
||||
@@ -0,0 +1,4 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
#Save-GPOZaurrFiles -GPOPath $ENV:USERPROFILE\Desktop\GPOExport -DeleteExisting
|
||||
Save-GPOZaurrFiles -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPOExportEvotec' #-DeleteExisting
|
||||
@@ -0,0 +1,12 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# Asses GPO based on exported data
|
||||
$Output = Invoke-GPOZaurr -GPOPath $Env:USERPROFILE\Desktop\GPOExport -Verbose
|
||||
#$Output = Invoke-GPOZaurr -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPOExportTest' -Verbose
|
||||
$Output | Format-Table *
|
||||
|
||||
# Export to Excel
|
||||
foreach ($Key in $Output.Reports.Keys) {
|
||||
$Output.Reports[$Key] | ConvertTo-Excel -FilePath $Env:USERPROFILE\Desktop\EFGPOAnalysis.xlsx -ExcelWorkSheetName $Key -AutoFilter -AutoFit -FreezeTopRowFirstColumn
|
||||
}
|
||||
Start-Process "$Env:USERPROFILE\Desktop\EFGPOAnalysis.xlsx"
|
||||
@@ -0,0 +1,20 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$Output = Invoke-GPOZaurr -GPOPath 'C:\Support\GitHub\GpoZaurr\Ignore\GPOExportEvotec1'
|
||||
$Output | Format-Table
|
||||
$Output.Reports.RegistrySettings | Format-Table *
|
||||
$Output.Reports.InternetExplorerZones | Format-Table *
|
||||
|
||||
# Report to Excel of translated reports
|
||||
foreach ($Key in $Output.Reports.Keys) {
|
||||
$Output.Reports[$Key] | ConvertTo-Excel -FilePath $Env:USERPROFILE\Desktop\GPOAnalysis.xlsx -ExcelWorkSheetName $Key -AutoFilter -AutoFit -FreezeTopRowFirstColumn
|
||||
}
|
||||
|
||||
# Report to HTML of translated reports
|
||||
New-HTML {
|
||||
foreach ($Key in $Output.Reports.Keys) {
|
||||
New-HTMLTab -Name $Key {
|
||||
New-HTMLTable -DataTable $Output.Reports[$Key] -Filtering
|
||||
}
|
||||
}
|
||||
} -FilePath $Env:USERPROFILE\Desktop\GPOAnalysis.html -ShowHTML -Online
|
||||
@@ -0,0 +1,8 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# This gets the same thing as earlier examples
|
||||
# with a difference where one entry per gpo and all settings for that GPO is stored under settings property.
|
||||
$Output = Invoke-GPOZaurr -SingleObject
|
||||
$Output | Format-Table
|
||||
$Output.Reports.RegistrySettings | Format-Table *
|
||||
$Output.Reports.RegistrySettings[0].Settings | Format-Table *
|
||||
@@ -0,0 +1,13 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# Use Save-GPOZaurrFiles -GPOPath $ENV:USERPROFILE\Desktop\GPOExportAudit
|
||||
$Output = Invoke-GPOZaurr -GPOPath $ENV:USERPROFILE\Desktop\GPOExportAudit -Verbose #-SkipCleanup #-Type PoliciesPrinters, Policies
|
||||
$Output | Format-Table *
|
||||
|
||||
$Output.Reports | Format-Table
|
||||
|
||||
# Export to Excel
|
||||
foreach ($Key in $Output.Reports.Keys) {
|
||||
$Output.Reports[$Key] | ConvertTo-Excel -FilePath $Env:USERPROFILE\Desktop\GPOAnalysis.xlsx -ExcelWorkSheetName $Key -AutoFilter -AutoFit -FreezeTopRowFirstColumn
|
||||
}
|
||||
Start-Process "$Env:USERPROFILE\Desktop\GPOAnalysis.xlsx"
|
||||
@@ -0,0 +1,4 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$Files = Get-GPOZaurrFiles -Limited -Signature
|
||||
$Files | ConvertTo-Excel -OpenWorkBook -FilePath $Env:USERPROFILE\Desktop\GPOTesting.xlsx -ExcelWorkSheetName 'GPO Output' -AutoFilter -AutoFit -FreezeTopRowFirstColumn
|
||||
@@ -0,0 +1,6 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
$Policies = Get-GPOZaurrFilesPolicyDefinition -Signature
|
||||
$Policies | Format-Table
|
||||
#$Policies.FilesToDelete | Format-Table *
|
||||
$Policies['ad.evotec.xyz'] | Format-Table *
|
||||
@@ -0,0 +1,7 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# Report on empty folders
|
||||
Get-GPOZaurrFolders -FolderType Empty | Format-Table *
|
||||
|
||||
# ! NOT READY FOR EMPTY
|
||||
#Remove-GPOZaurrFolders -FolderType Empty -Verbose -BackupPath $Env:USERPROFILE\Desktop\SomeBackup1 -WhatIf
|
||||
@@ -0,0 +1,7 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# Report on NTFRS folders
|
||||
Get-GPOZaurrFolders -FolderType NTFRS | Format-Table *
|
||||
|
||||
# Remove NTFRS (broken replication folders)
|
||||
Remove-GPOZaurrFolders -FolderType NTFRS -Verbose -BackupPath $Env:USERPROFILE\Desktop\SomeBackup -WhatIf
|
||||
@@ -0,0 +1,10 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# Cleanup based on https://techcommunity.microsoft.com/t5/ask-the-directory-services-team/manually-clearing-the-conflictanddeleted-folder-in-dfsr/ba-p/395711
|
||||
|
||||
# Get dfsr information
|
||||
$DFSR = Get-GPOZaurrSysvolDFSR
|
||||
$DFSR | Format-Table *
|
||||
|
||||
# Cleanup DFSR Conflict Path
|
||||
Clear-GPOZaurrSysvolDFSR -WhatIf
|
||||
@@ -0,0 +1,5 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
Invoke-GPOZaurrSupport -ComputerName 'AD1' -UserName 'przemyslaw.klys' -Type HTML
|
||||
#$Support
|
||||
# $Support.ComputerResults.GPO | select name, @{LABEL=”LinkOrder“;EXPRESSION={$_.link.linkorder}} | sort linkorder
|
||||
@@ -0,0 +1,21 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# Extracts CSE from registry
|
||||
$AllRegistryExtensions = Find-CSExtension
|
||||
$AllRegistryExtensions | Format-Table
|
||||
|
||||
# Uses Hashtable - similar to above but much faster
|
||||
$AllRegistryExtensionsFaster = foreach ($CSE in $AllRegistryExtensions) {
|
||||
ConvertFrom-CSExtension -CSE $CSE.CSE
|
||||
}
|
||||
$AllRegistryExtensionsFaster | Format-Table
|
||||
|
||||
# With this we can find out if we're missing anything in hashtable so we can update code if nessecary
|
||||
$MissingEntries = foreach ($CSE in $AllRegistryExtensions) {
|
||||
$Output = ConvertFrom-CSExtension -CSE $CSE.CSE
|
||||
if ($Output.CSE -eq $Output.Description) {
|
||||
# THis means the value in hashtable is missing this entry and we should add it
|
||||
$CSE
|
||||
}
|
||||
}
|
||||
$MissingEntries | Format-Table
|
||||
@@ -0,0 +1,10 @@
|
||||
Import-Module "$PSScriptRoot\..\GPoZaurr.psd1" -Force
|
||||
|
||||
# Get basic output DN, CanonicalName, BlockInheritance (True/False)
|
||||
#$Objects = Get-GPOZaurrInheritance
|
||||
#$Objects | Format-Table
|
||||
|
||||
# Get same output DN, CanonicalName, BlockInheritance (True/False) + Users/Computers + UsersCount/ComputerCount for those with Blocked Inhertiance
|
||||
# This is so you can have a list what machines are affected
|
||||
$Objects = Get-GPOZaurrInheritance -IncludeBlockedObjects -OnlyBlockedInheritance
|
||||
$Objects | Format-Table
|
||||
+7
-7
@@ -1,27 +1,27 @@
|
||||
@{
|
||||
AliasesToExport = ''
|
||||
AliasesToExport = 'Get-GPOZaurrFilesPolicyDefinitions', 'Find-GPO'
|
||||
Author = 'Przemyslaw Klys'
|
||||
CompanyName = 'Evotec'
|
||||
CompatiblePSEditions = 'Desktop'
|
||||
Copyright = '(c) 2011 - 2020 Przemyslaw Klys @ Evotec. All rights reserved.'
|
||||
Description = 'Group Policy Eater'
|
||||
FunctionsToExport = 'Backup-GPOZaurr', 'Get-GPOZaurr', 'Get-GPOZaurrBackupInformation', 'Get-GPOZaurrOwner', 'Get-GPOZaurrPassword', 'Get-GPOZaurrPermission', 'Get-GPOZaurrWMI', 'New-GPOZaurrWMI', 'Remove-GPOZaurr', 'Remove-GPOZaurrPermission', 'Remove-GPOZaurrWMI', 'Restore-GPOZaurr', 'Save-GPOZaurrFiles', 'Set-GPOZaurrOwner'
|
||||
Description = 'Group Policy Eater is a PowerShell module that aims to gather information about Group Policies but also allows fixing issues that you may find in them.'
|
||||
FunctionsToExport = 'Add-GPOPermission', 'Add-GPOZaurrPermission', 'Backup-GPOZaurr', 'Clear-GPOZaurrSysvolDFSR', 'ConvertFrom-CSExtension', 'Find-CSExtension', 'Get-GPOZaurr', 'Get-GPOZaurrAD', 'Get-GPOZaurrBackupInformation', 'Get-GPOZaurrDictionary', 'Get-GPOZaurrFiles', 'Get-GPOZaurrFilesPolicyDefinition', 'Get-GPOZaurrFolders', 'Get-GPOZaurrInheritance', 'Get-GPOZaurrLegacyFiles', 'Get-GPOZaurrLink', 'Get-GPOZaurrLinkSummary', 'Get-GPOZaurrOwner', 'Get-GPOZaurrPassword', 'Get-GPOZaurrPermission', 'Get-GPOZaurrPermissionConsistency', 'Get-GPOZaurrPermissionSummary', 'Get-GPOZaurrSysvol', 'Get-GPOZaurrSysvolDFSR', 'Get-GPOZaurrWMI', 'Invoke-GPOZaurr', 'Invoke-GPOZaurrPermission', 'Invoke-GPOZaurrSupport', 'New-GPOZaurrWMI', 'Remove-GPOPermission', 'Remove-GPOZaurr', 'Remove-GPOZaurrFolders', 'Remove-GPOZaurrLegacyFiles', 'Remove-GPOZaurrOrphanedSysvolFolders', 'Remove-GPOZaurrPermission', 'Remove-GPOZaurrWMI', 'Repair-GPOZaurrPermissionConsistency', 'Restore-GPOZaurr', 'Save-GPOZaurrFiles', 'Set-GPOOwner', 'Set-GPOZaurrOwner'
|
||||
GUID = 'f7d4c9e4-0298-4f51-ad77-e8e3febebbde'
|
||||
ModuleVersion = '0.0.14'
|
||||
ModuleVersion = '0.0.58'
|
||||
PowerShellVersion = '5.1'
|
||||
PrivateData = @{
|
||||
PSData = @{
|
||||
Tags = 'Windows', 'ActiveDirectory', 'GPO'
|
||||
Tags = 'Windows', 'ActiveDirectory', 'GPO', 'GroupPolicy'
|
||||
ProjectUri = 'https://github.com/EvotecIT/GPOZaurr'
|
||||
ExternalModuleDependencies = 'ActiveDirectory', 'GroupPolicy', 'CimCmdlets', 'Microsoft.PowerShell.Management', 'Microsoft.PowerShell.Utility'
|
||||
}
|
||||
}
|
||||
RequiredModules = @{
|
||||
ModuleVersion = '0.0.135'
|
||||
ModuleVersion = '0.0.168'
|
||||
ModuleName = 'PSSharedGoods'
|
||||
Guid = 'ee272aa8-baaa-4edf-9f45-b6d6f7d844fe'
|
||||
}, @{
|
||||
ModuleVersion = '0.0.48'
|
||||
ModuleVersion = '0.0.67'
|
||||
ModuleName = 'ADEssentials'
|
||||
Guid = '9fc9fd61-7f11-4f4b-a527-084086f1905f'
|
||||
}, 'ActiveDirectory', 'GroupPolicy', 'CimCmdlets', 'Microsoft.PowerShell.Management', 'Microsoft.PowerShell.Utility'
|
||||
|
||||
@@ -0,0 +1,243 @@
|
||||
function ConvertFrom-XMLRSOP {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[System.Xml.XmlElement]$Content,
|
||||
[string] $ResultsType,
|
||||
[Microsoft.GroupPolicy.GPRsop] $ResultantSetPolicy,
|
||||
[string] $Splitter = [System.Environment]::NewLine
|
||||
)
|
||||
$GPOPrimary = [ordered] @{
|
||||
Summary = $null
|
||||
SummaryDetails = [System.Collections.Generic.List[PSCustomObject]]::new()
|
||||
SummaryDownload = $null
|
||||
ResultantSetPolicy = $ResultantSetPolicy
|
||||
|
||||
GroupPolicies = $null
|
||||
GroupPoliciesLinks = $null
|
||||
GroupPoliciesApplied = $null
|
||||
GroupPoliciesDenied = $null
|
||||
Results = [ordered]@{}
|
||||
}
|
||||
|
||||
$Object = [ordered] @{
|
||||
ReadTime = [DateTime] $Content.ReadTime
|
||||
ComputerName = $Content.$ResultsType.Name
|
||||
DomainName = $Content.$ResultsType.Domain
|
||||
OrganizationalUnit = $Content.$ResultsType.SOM
|
||||
Site = $Content.$ResultsType.Site
|
||||
GPOTypes = $Content.$ResultsType.ExtensionData.Name.'#text' -join $Splitter
|
||||
SlowLink = if ($Content.$ResultsType.SlowLink -eq 'true') { $true } else { $false };
|
||||
}
|
||||
|
||||
$GPOPrimary['Summary'] = $Object
|
||||
[Array] $GPOPrimary['SecurityGroups'] = foreach ($Group in $Content.$ResultsType.SecurityGroup) {
|
||||
[PSCustomObject] @{
|
||||
Name = $Group.Name.'#Text'
|
||||
SID = $Group.SID.'#Text'
|
||||
}
|
||||
}
|
||||
[Array] $GPOPrimary['GroupPolicies'] = foreach ($GPO in $Content.$ResultsType.GPO) {
|
||||
|
||||
<#
|
||||
$EventsReason = @{
|
||||
'NOTAPPLIED-EMPTY' = 'Not Applied (Empty)'
|
||||
'DENIED-WMIFILTER' = 'Denied (WMI Filter)'
|
||||
'DENIED-SECURITY' = 'Denied (Security)'
|
||||
}
|
||||
#>
|
||||
# Lets translate CSE extensions as some didn't translate automatically
|
||||
$ExtensionName = $GPO.ExtensionName | ForEach-Object {
|
||||
ConvertFrom-CSExtension -CSE $_ -Limited
|
||||
}
|
||||
$GPOObject = [PSCustomObject] @{
|
||||
Name = $GPO.Name
|
||||
#Path = $GPO.Path
|
||||
GUID = $GPO.Path.Identifier.'#text'
|
||||
DomainName = if ($GPO.Path.Domain.'#text') { $GPO.Path.Domain.'#text' } else { 'Local Policy' };
|
||||
#VersionDirectory = $GPO.VersionDirectory
|
||||
#VersionSysvol = $GPO.VersionSysvol
|
||||
Revision = -join ('AD (', $GPO.VersionDirectory, '), SYSVOL (', $GPO.VersionSysvol, ')')
|
||||
IsValid = if ($GPO.IsValid -eq 'true') { $true } else { $false };
|
||||
Status = if ($GPO.FilterAllowed -eq 'true' -and $GPO.AccessDenied -eq 'false') { 'Applied' } else { 'Denied' };
|
||||
FilterAllowed = if ($GPO.FilterAllowed -eq 'true') { $true } else { $false };
|
||||
AccessAllowed = if ($GPO.AccessDenied -eq 'true') { $false } else { $true };
|
||||
FilterName = $GPO.FilterName # : Test
|
||||
ExtensionName = ($ExtensionName | Sort-Object -Unique) -join '; '
|
||||
# This isn't really pretty for large amount of links but can be useful for assesing things
|
||||
SOMOrder = $GPO.Link.SOMOrder -join '; '
|
||||
AppliedOrder = $GPO.Link.AppliedOrder -join '; '
|
||||
LinkOrder = $GPO.Link.LinkOrder -join '; '
|
||||
Enabled = ($GPO.Link.Enabled | ForEach-Object { if ($_ -eq 'true') { $true } else { $false }; }) -join '; '
|
||||
Enforced = ($GPO.Link.NoOverride | ForEach-Object { if ($_ -eq 'true') { $true } else { $false }; }) -join '; ' # : true
|
||||
SecurityFilter = $GPO.SecurityFilter -join '; ' # SecurityFilter : {NT AUTHORITY\Authenticated Users, EVOTEC\GDS-TestGroup3}
|
||||
FilterId = $GPO.FilterID # : MSFT_SomFilter.ID="{ff08bc72-dae6-4890-b4cf-85a9c3b00056}",Domain="ad.evotec.xyz"
|
||||
Links = $GPO.Link.SOMPath -join '; '
|
||||
}
|
||||
$GPOObject
|
||||
}
|
||||
[Array] $GPOPrimary['GroupPoliciesLinks'] = foreach ($GPO in $Content.$ResultsType.GPO) {
|
||||
foreach ($Link in $GPO.Link) {
|
||||
[PSCustomObject] @{
|
||||
DisplayName = $GPO.Name
|
||||
DomainName = $GPO.Path.Domain.'#text'
|
||||
GUID = $GPO.Path.Identifier.'#text'
|
||||
SOMPath = $Link.SOMPath # : ad.evotec.xyz
|
||||
SOMOrder = $Link.SOMOrder # : 2
|
||||
AppliedOrder = $Link.AppliedOrder # : 0
|
||||
LinkOrder = $Link.LinkOrder # : 4
|
||||
Enabled = if ($Link.Enabled -eq 'true') { $true } else { $false }; # : true
|
||||
Enforced = if ($Link.NoOverride -eq 'true') { $true } else { $false }; # : true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
[Array] $GPOPrimary['ScopeOfManagement'] = foreach ($SOM in $Content.$ResultsType.SearchedSOM) {
|
||||
[PSCustomObject] @{
|
||||
Path = $SOM.Path
|
||||
Type = $SOM.Type
|
||||
Order = $SOM.Order
|
||||
BlocksInheritance = if ($SOM.BlocksInheritance -eq 'true') { $true } else { $false };
|
||||
Blocked = if ($SOM.Blocked -eq 'true') { $true } else { $false };
|
||||
Reason = if ($SOM.Reason -eq 'true') { $true } else { $false };
|
||||
}
|
||||
}
|
||||
[Array] $GPOPrimary['ExtensionStatus'] = foreach ($Details in $Content.$ResultsType.ExtensionStatus) {
|
||||
[PSCustomObject] @{
|
||||
Name = $Details.Name # : Registry
|
||||
Identifier = $Details.Identifier # : {35378EAC-683F-11D2-A89A-00C04FBBCFA2}
|
||||
BeginTime = $Details.BeginTime # : 2020-04-02T12:05:10
|
||||
EndTime = $Details.EndTime # : 2020-04-02T12:05:10
|
||||
LoggingStatus = $Details.LoggingStatus # : Complete
|
||||
Error = $Details.Error # : 0
|
||||
}
|
||||
}
|
||||
[Array] $GPOPrimary['ExtensionData'] = $Content.$ResultsType.ExtensionData.Extension
|
||||
|
||||
|
||||
foreach ($Single in $Content.$ResultsType.EventsDetails.SinglePassEventsDetails) {
|
||||
$GPOPrimary['Results']["$($Single.ActivityId)"] = [ordered] @{}
|
||||
|
||||
$GPOPrimary['Results']["$($Single.ActivityId)"]['SummaryDetails'] = [Ordered] @{
|
||||
ActivityId = $Single.ActivityId # : {6400d0bf-ac88-4ee6-b2c2-ca2cbbab0695}
|
||||
ProcessingTrigger = $Single.ProcessingTrigger # : Periodic
|
||||
ProcessingAppMode = $Single.ProcessingAppMode # : Background
|
||||
LinkSpeedInKbps = $Single.LinkSpeedInKbps # : 0
|
||||
SlowLinkThresholdInKbps = $Single.SlowLinkThresholdInKbps # : 500
|
||||
DomainControllerName = $Single.DomainControllerName # : AD1.ad.evotec.xyz
|
||||
DomainControllerIPAddress = $Single.DomainControllerIPAddress # : 192.168.240.189
|
||||
PolicyProcessingMode = $Single.PolicyProcessingMode # : None
|
||||
PolicyElapsedTimeInMilliseconds = $Single.PolicyElapsedTimeInMilliseconds # : 1202
|
||||
ErrorCount = $Single.ErrorCount # : 0
|
||||
WarningCount = $Single.WarningCount # : 0
|
||||
}
|
||||
|
||||
$GPOPrimary['SummaryDetails'].Add([PSCustomObject] $GPOPrimary['Results']["$($Single.ActivityId)"]['SummaryDetails'])
|
||||
|
||||
[Array] $GPOPrimary['Results']["$($Single.ActivityId)"]['ProcessingTime'] = foreach ($Details in $Single.ExtensionProcessingTime) {
|
||||
[PSCustomObject] @{
|
||||
ExtensionName = $Details.ExtensionName
|
||||
ExtensionGuid = $Details.ExtensionGuid
|
||||
ElapsedTimeInMilliseconds = $Details.ElapsedTimeInMilliseconds
|
||||
ProcessedTimeStamp = $Details.ProcessedTimeStamp
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
$EventsLevel = @{
|
||||
'5' = 'Verbose'
|
||||
'4' = 'Informational'
|
||||
'3' = 'Warning'
|
||||
'2' = 'Error'
|
||||
'1' = 'Critical'
|
||||
'0' = 'LogAlways'
|
||||
}
|
||||
$EventsReason = @{
|
||||
'NOTAPPLIED-EMPTY' = 'Not Applied (Empty)'
|
||||
'DENIED-WMIFILTER' = 'Denied (WMI Filter)'
|
||||
'DENIED-SECURITY' = 'Denied (Security)'
|
||||
}
|
||||
|
||||
[Array] $GPOPrimary['Results']["$($Single.ActivityId)"]['Events'] = foreach ($Event in $Single.EventRecord) {
|
||||
[xml] $EventDetails = $Event.EventXML
|
||||
$EventInformation = [ordered] @{
|
||||
Description = $Event.EventDescription
|
||||
Provider = $EventDetails.Event.System.Provider.Name # : Provider
|
||||
ProviderGUID = $EventDetails.Event.System.Provider.Guid
|
||||
EventID = $EventDetails.Event.System.EventID # : 4006
|
||||
Version = $EventDetails.Event.System.Version # : 1
|
||||
Level = $EventsLevel[$EventDetails.Event.System.Level] # : 4
|
||||
Task = $EventDetails.Event.System.Task # : 0
|
||||
Opcode = $EventDetails.Event.System.Opcode # : 1
|
||||
Keywords = $EventDetails.Event.System.Keywords # : 0x4000000000000000
|
||||
TimeCreated = [DateTime] $EventDetails.Event.System.TimeCreated.SystemTime # : TimeCreated, 2020-08-09T20:16:44.5668052Z
|
||||
EventRecordID = $EventDetails.Event.System.EventRecordID # : 10641325
|
||||
Correlation = $EventDetails.Event.System.Correlation.ActivityID # : Correlation
|
||||
Execution = -join ("ProcessID: ", $EventDetails.Event.System.Execution.ProcessID, " ThreadID: ", $EventDetails.Event.System.Execution.ThreadID) # : Execution
|
||||
Channel = $EventDetails.Event.System.Channel # : Microsoft-Windows-GroupPolicy / Operational
|
||||
Computer = $EventDetails.Event.System.Computer # : AD1.ad.evotec.xyz
|
||||
Security = $EventDetails.Event.System.Security.UserID # : Security
|
||||
}
|
||||
foreach ($Entry in $EventDetails.Event.EventData.Data) {
|
||||
$EventInformation["$($Entry.Name)"] = $Entry.'#text'
|
||||
}
|
||||
[PSCustomObject] $EventInformation
|
||||
}
|
||||
|
||||
# Lets build events by ID, this will be useful for better/easier processing
|
||||
$GPOPrimary['Results']["$($Single.ActivityId)"]['EventsByID'] = [ordered] @{}
|
||||
$GroupedEvents = $GPOPrimary['Results']["$($Single.ActivityId)"]['Events'] | Group-Object -Property EventId
|
||||
foreach ($Events in $GroupedEvents) {
|
||||
$GPOPrimary['Results']["$($Single.ActivityId)"]['EventsByID'][$Events.Name] = $Events.Group
|
||||
}
|
||||
|
||||
$GPOPrimary['Results']["$($Single.ActivityId)"]['GroupPoliciesApplied'] = & {
|
||||
if ($GPOPrimary['Results']["$($Single.ActivityId)"]['EventsByID']['5312']) {
|
||||
[xml] $GPODetailsApplied = -join ('<Details>', $GPOPrimary['Results']["$($Single.ActivityId)"]['EventsByID']['5312'].GPOinfoList, '</Details>')
|
||||
foreach ($GPO in $GPODetailsApplied.Details.GPO) {
|
||||
$ReturnObject = [ordered] @{
|
||||
GUID = $GPO.ID # : { 4E1F9C70-1DDB-4AB6-BBA3-14A8E07F0B4B }
|
||||
DisplayName = $GPO.Name # : DC | Event Log Settings
|
||||
Version = $GPO.Version # : 851981
|
||||
Link = $GPO.SOM # : LDAP: / / OU = Domain Controllers, DC = ad, DC = evotec, DC = xyz
|
||||
SysvolPath = $GPO.FSPath # : \\ad.evotec.xyz\SysVol\ad.evotec.xyz\Policies\ { 4E1F9C70-1DDB-4AB6-BBA3-14A8E07F0B4B }\Machine
|
||||
#GPOTypes = $GPO.Extensions -join '; ' # : [ { 35378EAC-683F-11D2-A89A-00C04FBBCFA2 } { D02B1F72 - 3407 - 48AE-BA88-E8213C6761F1 }]
|
||||
}
|
||||
$TranslatedExtensions = foreach ($Extension in $GPO.Extensions) {
|
||||
ConvertFrom-CSExtension -CSE $Extension -Limited
|
||||
}
|
||||
$ReturnObject['GPOTypes'] = $TranslatedExtensions -join '; '
|
||||
[PSCustomObject] $ReturnObject
|
||||
}
|
||||
}
|
||||
}
|
||||
$GPOPrimary['Results']["$($Single.ActivityId)"]['GroupPoliciesDenied'] = & {
|
||||
if ($GPOPrimary['Results']["$($Single.ActivityId)"]['EventsByID']['5312']) {
|
||||
[xml] $GPODetailsDenied = -join ('<Details>', $GPOPrimary['Results']["$($Single.ActivityId)"]['EventsByID']['5313'].GPOinfoList, '</Details>')
|
||||
foreach ($GPO in $GPODetailsDenied.Details.GPO) {
|
||||
[PSCustomObject] @{
|
||||
GUID = $GPO.ID #: { 6AC1786C-016F-11D2-945F-00C04fB984F9 }
|
||||
DisplayName = $GPO.Name #: Default Domain Controllers Policy
|
||||
Version = $GPO.Version #: 131074
|
||||
Link = $GPO.SOM #: LDAP: / / OU = Domain Controllers, DC = ad, DC = evotec, DC = xyz
|
||||
SysvolPath = $GPO.FSPath #: \\ad.evotec.xyz\sysvol\ad.evotec.xyz\Policies\ { 6AC1786C-016F-11D2-945F-00C04fB984F9 }\Machine
|
||||
Reason = $EventsReason["$($GPO.Reason)"] #: DENIED-WMIFILTER
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
$GPOPrimary['Results']["$($Single.ActivityId)"]['SummaryDownload'] = & {
|
||||
if ($GPOPrimary['Results']["$($Single.ActivityId)"]['EventsByID']['5126']) {
|
||||
[PSCustomObject] @{
|
||||
IsBackgroundProcessing = if ($GPOPrimary['Results']["$($Single.ActivityId)"]['EventsByID']['5126'].IsBackgroundProcessing -eq 'true') { $true } else { $false }; # : true
|
||||
IsAsyncProcessing = if ($GPOPrimary['Results']["$($Single.ActivityId)"]['EventsByID']['5126'].IsAsyncProcessing -eq 'true') { $true } else { $false }; # : false
|
||||
Downloaded = $GPOPrimary['Results']["$($Single.ActivityId)"]['EventsByID']['5126'].NumberOfGPOsDownloaded # : 7
|
||||
Applicable = $GPOPrimary['Results']["$($Single.ActivityId)"]['EventsByID']['5126'].NumberOfGPOsApplicable # : 6
|
||||
DownloadTimeMiliseconds = $GPOPrimary['Results']["$($Single.ActivityId)"]['EventsByID']['5126'].GPODownloadTimeElapsedInMilliseconds # : 375
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
$GPOPrimary
|
||||
}
|
||||
@@ -0,0 +1,39 @@
|
||||
function ConvertTo-XMLAccountPolicy {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO
|
||||
)
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
ClearTextPassword = 'Not Set'
|
||||
LockoutBadCount = 'Not Set'
|
||||
LockoutDuration = 'Not Set'
|
||||
MaximumPasswordAge = 'Not Set'
|
||||
MinimumPasswordAge = 'Not Set'
|
||||
MinimumPasswordLength = 'Not Set'
|
||||
PasswordComplexity = 'Not Set'
|
||||
PasswordHistorySize = 'Not Set'
|
||||
ResetLockoutCount = 'Not Set'
|
||||
MaxClockSkew = 'Not Set'
|
||||
MaxRenewAge = 'Not Set'
|
||||
MaxServiceAge = 'Not Set'
|
||||
MaxTicketAge = 'Not Set'
|
||||
TicketValidateClient = 'Not Set'
|
||||
}
|
||||
foreach ($GPOEntry in $GPO.DataSet) {
|
||||
if ($GPOEntry.SettingBoolean) {
|
||||
$CreateGPO[$($GPOEntry.Name)] = if ($GPOEntry.SettingBoolean -eq 'true') { 'Enabled' } elseif ($GPOEntry.SettingBoolean -eq 'false') { 'Disabled' } else { 'Not set' };
|
||||
} elseif ($GPOEntry.SettingNumber) {
|
||||
$CreateGPO[$($GPOEntry.Name)] = [int] $GPOEntry.SettingNumber
|
||||
}
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
@@ -0,0 +1,116 @@
|
||||
function ConvertTo-XMLAudit {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $FullObject
|
||||
)
|
||||
$SettingType = @{
|
||||
'0' = 'No Auditing'
|
||||
'1' = 'Success'
|
||||
'2' = 'Failure'
|
||||
'3' = 'Success, Failure'
|
||||
}
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
AuditAccountLogon = 'Not configured'
|
||||
AuditAccountManage = 'Not configured'
|
||||
AuditDSAccess = 'Not configured'
|
||||
AuditLogonEvents = 'Not configured'
|
||||
AuditObjectAccess = 'Not configured'
|
||||
AuditPolicyChange = 'Not configured'
|
||||
AuditPrivilegeUse = 'Not configured'
|
||||
AuditProcessTracking = 'Not configured'
|
||||
AuditSystemEvents = 'Not configured'
|
||||
# Advanced Policies
|
||||
AuditAccountLockout = 'Not configured'
|
||||
AuditApplicationGenerated = 'Not configured'
|
||||
AuditApplicationGroupManagement = 'Not configured'
|
||||
AuditAuditPolicyChange = 'Not configured'
|
||||
AuditAuthenticationPolicyChange = 'Not configured'
|
||||
AuditAuthorizationPolicyChange = 'Not configured'
|
||||
AuditCentralAccessPolicyStaging = 'Not configured'
|
||||
AuditCertificationServices = 'Not configured'
|
||||
AuditComputerAccountManagement = 'Not configured'
|
||||
AuditCredentialValidation = 'Not configured'
|
||||
AuditDetailedDirectoryServiceReplication = 'Not configured'
|
||||
AuditDetailedFileShare = 'Not configured'
|
||||
AuditDirectoryServiceAccess = 'Not configured'
|
||||
AuditDirectoryServiceChanges = 'Not configured'
|
||||
AuditDirectoryServiceReplication = 'Not configured'
|
||||
AuditDistributionGroupManagement = 'Not configured'
|
||||
AuditDPAPIActivity = 'Not configured'
|
||||
AuditFileShare = 'Not configured'
|
||||
AuditFileSystem = 'Not configured'
|
||||
AuditFilteringPlatformConnection = 'Not configured'
|
||||
AuditFilteringPlatformPacketDrop = 'Not configured'
|
||||
AuditFilteringPlatformPolicyChange = 'Not configured'
|
||||
AuditGroupMembership = 'Not configured'
|
||||
AuditHandleManipulation = 'Not configured'
|
||||
AuditIPsecDriver = 'Not configured'
|
||||
AuditIPsecExtendedMode = 'Not configured'
|
||||
AuditIPsecMainMode = 'Not configured'
|
||||
AuditIPsecQuickMode = 'Not configured'
|
||||
AuditKerberosAuthenticationService = 'Not configured'
|
||||
AuditKerberosServiceTicketOperations = 'Not configured'
|
||||
AuditKernelObject = 'Not configured'
|
||||
AuditLogoff = 'Not configured'
|
||||
AuditLogon = 'Not configured'
|
||||
AuditMPSSVCRuleLevelPolicyChange = 'Not configured'
|
||||
AuditNetworkPolicyServer = 'Not configured'
|
||||
AuditNonSensitivePrivilegeUse = 'Not configured'
|
||||
AuditOtherAccountLogonEvents = 'Not configured'
|
||||
AuditOtherAccountManagementEvents = 'Not configured'
|
||||
AuditOtherLogonLogoffEvents = 'Not configured'
|
||||
AuditOtherObjectAccessEvents = 'Not configured'
|
||||
AuditOtherPolicyChangeEvents = 'Not configured'
|
||||
AuditOtherPrivilegeUseEvents = 'Not configured'
|
||||
AuditOtherSystemEvents = 'Not configured'
|
||||
AuditPNPActivity = 'Not configured'
|
||||
AuditProcessCreation = 'Not configured'
|
||||
AuditProcessTermination = 'Not configured'
|
||||
AuditRegistry = 'Not configured'
|
||||
AuditRemovableStorage = 'Not configured'
|
||||
AuditRPCEvents = 'Not configured'
|
||||
AuditSAM = 'Not configured'
|
||||
AuditSecurityGroupManagement = 'Not configured'
|
||||
AuditSecurityStateChange = 'Not configured'
|
||||
AuditSecuritySystemExtension = 'Not configured'
|
||||
AuditSensitivePrivilegeUse = 'Not configured'
|
||||
AuditSpecialLogon = 'Not configured'
|
||||
AuditSystemIntegrity = 'Not configured'
|
||||
AuditUserDeviceClaims = 'Not configured'
|
||||
AuditUserAccountManagement = 'Not configured'
|
||||
}
|
||||
foreach ($GPOEntry in $GPO.DataSet) {
|
||||
if ($GPOEntry.PolicyTarget) {
|
||||
# Category = 'AuditSettings', Settings = 'AuditSetting'
|
||||
$Category = $GPOEntry.SubcategoryName -replace ' ', '' -replace '-', '' -replace '/', ''
|
||||
if ($CreateGPO["$($Category)"]) {
|
||||
$CreateGPO["$($Category)"] = $SettingType["$($GPOEntry.SettingValue)"]
|
||||
}
|
||||
} else {
|
||||
# Category = 'SecuritySettings', Settings = 'Audit'
|
||||
$SuccessAttempts = try { [bool]::Parse($GPOEntry.SuccessAttempts) } catch { $null };
|
||||
$FailureAttempts = try { [bool]::Parse($GPOEntry.FailureAttempts) } catch { $null };
|
||||
if ($SuccessAttempts -and $FailureAttempts) {
|
||||
$Setting = 'Success, Failure'
|
||||
} elseif ($SuccessAttempts) {
|
||||
$Setting = 'Success'
|
||||
} elseif ($FailureAttempts) {
|
||||
$Setting = 'Failure'
|
||||
} else {
|
||||
$Setting = 'Not configured'
|
||||
}
|
||||
$CreateGPO["$($GPOEntry.Name)"] = $Setting
|
||||
}
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
@@ -0,0 +1,75 @@
|
||||
function ConvertTo-XMLDriveMapSettings {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
if ($SingleObject) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Count = 0
|
||||
Settings = $null
|
||||
}
|
||||
[Array] $CreateGPO['Settings'] = foreach ($Entry in $GPO.DataSet.Drive) {
|
||||
[PSCustomObject] @{
|
||||
Changed = [DateTime] $Entry.changed
|
||||
#uid = $Entry.uid
|
||||
GPOSettingOrder = $Entry.GPOSettingOrder
|
||||
Filter = $Entry.Filter
|
||||
|
||||
Name = $Entry.Name
|
||||
Status = $Entry.status
|
||||
Action = $Script:Actions["$($Entry.Properties.action)"]
|
||||
ThisDrive = $Entry.Properties.thisDrive
|
||||
AllDrives = $Entry.Properties.allDrives
|
||||
UserName = $Entry.Properties.userName
|
||||
Path = $Entry.Properties.path
|
||||
Label = $Entry.Properties.label
|
||||
Persistent = if ($Entry.Properties.persistent -eq '1') { $true } elseif ($Entry.Properties.persistent -eq '0') { $false } else { $Entry.Properties.persistent };
|
||||
UseLetter = if ($Entry.Properties.useLetter -eq '1') { $true } elseif ($Entry.Properties.useLetter -eq '0') { $false } else { $Entry.Properties.useLetter };
|
||||
Letter = $Entry.Properties.letter
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Entry in $GPO.DataSet.Drive) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Changed = [DateTime] $Entry.changed
|
||||
#uid = $Entry.uid
|
||||
GPOSettingOrder = $Entry.GPOSettingOrder
|
||||
Filter = $Entry.Filter
|
||||
|
||||
Name = $Entry.Name
|
||||
Status = $Entry.status
|
||||
Action = $Script:Actions["$($Entry.Properties.action)"]
|
||||
ThisDrive = $Entry.Properties.thisDrive
|
||||
AllDrives = $Entry.Properties.allDrives
|
||||
UserName = $Entry.Properties.userName
|
||||
Path = $Entry.Properties.path
|
||||
Label = $Entry.Properties.label
|
||||
Persistent = if ($Entry.Properties.persistent -eq '1') { $true } elseif ($Entry.Properties.persistent -eq '0') { $false } else { $Entry.Properties.persistent };
|
||||
UseLetter = if ($Entry.Properties.useLetter -eq '1') { $true } elseif ($Entry.Properties.useLetter -eq '0') { $false } else { $Entry.Properties.useLetter };
|
||||
Letter = $Entry.Properties.letter
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
function ConvertTo-XMLEventLog {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO
|
||||
)
|
||||
$RetionPeriod = @{
|
||||
'0' = 'Overwrite events as needed'
|
||||
'1' = 'Overwrite events by days'
|
||||
'2' = 'Do not overwrite events (Clear logs manually)'
|
||||
}
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
ApplicationAuditLogRetentionPeriod = $null
|
||||
ApplicationMaximumLogSize = $null
|
||||
ApplicationRestrictGuestAccess = $null
|
||||
ApplicationRetentionDays = $null
|
||||
SystemAuditLogRetentionPeriod = $null
|
||||
SystemMaximumLogSize = $null
|
||||
SystemRestrictGuestAccess = $null
|
||||
SystemRetentionDays = $null
|
||||
SecurityAuditLogRetentionPeriod = $null
|
||||
SecurityMaximumLogSize = $null
|
||||
SecurityRestrictGuestAccess = $null
|
||||
SecurityRetentionDays = $null
|
||||
}
|
||||
foreach ($GPOEntry in $GPO.DataSet) {
|
||||
if ($GPOEntry.SettingBoolean) {
|
||||
$CreateGPO["$($GPOEntry.Log)$($GPOEntry.Name)"] = if ($GPOEntry.SettingBoolean -eq 'true') { 'Enabled' } elseif ($GPOEntry.SettingBoolean -eq 'false') { 'Disabled' } else { 'Not set' };
|
||||
} elseif ($GPOEntry.SettingNumber) {
|
||||
if ($GPOEntry.Name -eq 'AuditLogRetentionPeriod') {
|
||||
if ($GPOEntry.SettingNumber) {
|
||||
$CreateGPO["$($GPOEntry.Log)$($GPOEntry.Name)"] = $RetionPeriod[$($GPOEntry.SettingNumber)]
|
||||
} else {
|
||||
# Won't happen?
|
||||
$CreateGPO["$($GPOEntry.Log)$($GPOEntry.Name)"] = $GPOEntry.SettingNumber
|
||||
}
|
||||
} else {
|
||||
$CreateGPO["$($GPOEntry.Log)$($GPOEntry.Name)"] = $GPOEntry.SettingNumber
|
||||
}
|
||||
}
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
@@ -0,0 +1,89 @@
|
||||
function ConvertTo-XMLGenericPolicy {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[string[]] $Category
|
||||
)
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
}
|
||||
$UsedNames = [System.Collections.Generic.List[string]]::new()
|
||||
|
||||
[Array] $Policies = foreach ($Cat in $Category) {
|
||||
$GPO.DataSet | Where-Object { $_.Category -like $Cat }
|
||||
}
|
||||
if ($Policies.Count -gt 0) {
|
||||
foreach ($Policy in $Policies) {
|
||||
#if ($Policy.Category -notlike $Category) {
|
||||
# We check again for Category because one GPO can have multiple categories
|
||||
# First check checks GPO globally,
|
||||
# continue
|
||||
#}
|
||||
$Name = Format-ToTitleCase -Text $Policy.Name -RemoveWhiteSpace -RemoveChar ',', '-', "'", '\(', '\)', ':'
|
||||
$CreateGPO[$Name] = $Policy.State
|
||||
|
||||
foreach ($Setting in @('DropDownList', 'Numeric', 'EditText', 'Text', 'CheckBox', 'ListBox')) {
|
||||
if ($Policy.$Setting) {
|
||||
foreach ($Value in $Policy.$Setting) {
|
||||
if ($Value.Name) {
|
||||
$SubName = Format-ToTitleCase -Text $Value.Name -RemoveWhiteSpace -RemoveChar ',', '-', "'", '\(', '\)', ':'
|
||||
$SubName = -join ($Name, $SubName)
|
||||
if ($SubName -notin $UsedNames) {
|
||||
$UsedNames.Add($SubName)
|
||||
} else {
|
||||
$TimesUsed = $UsedNames | Group-Object | Where-Object { $_.Name -eq $SubName }
|
||||
$NumberToUse = $TimesUsed.Count + 1
|
||||
# We add same name 2nd and 3rd time to make sure we count properly
|
||||
$UsedNames.Add($SubName)
|
||||
# We now build property name based on amnount of times
|
||||
$SubName = -join ($SubName, "$NumberToUse")
|
||||
}
|
||||
if ($Value.Value -is [string]) {
|
||||
$CreateGPO["$SubName"] = $Value.Value
|
||||
} elseif ($Value.Value -is [System.Xml.XmlElement]) {
|
||||
|
||||
<#
|
||||
if ($null -eq $Value.Value.Name) {
|
||||
# Shouldn't happen but lets see
|
||||
Write-Verbose $Value
|
||||
} else {
|
||||
$CreateGPO["$SubName"] = $Value.Value.Name
|
||||
}
|
||||
|
||||
#>
|
||||
if ($Value.Value.Element) {
|
||||
$CreateGPO["$SubName"] = $Value.Value.Element.Data -join '; '
|
||||
} elseif ($null -eq $Value.Value.Name) {
|
||||
# Shouldn't happen but lets see
|
||||
Write-Verbose "Tracking $Value"
|
||||
} else {
|
||||
$CreateGPO["$SubName"] = $Value.Value.Name
|
||||
}
|
||||
|
||||
} elseif ($Value.State) {
|
||||
$CreateGPO["$SubName"] = $Value.State
|
||||
} elseif ($null -eq $Value.Value) {
|
||||
# This is most likely Setting 'Text
|
||||
# Do nothing, usually it's just a text to display
|
||||
#Write-Verbose "Skipping value for display because it's empty. Name: $($Value.Name)"
|
||||
} else {
|
||||
# shouldn't happen
|
||||
Write-Verbose $Value
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
#}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
function ConvertTo-XMLGenericPublicKey {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[string[]] $Category
|
||||
)
|
||||
|
||||
$SkipNames = ('Name', 'LocalName', 'NamespaceURI', 'Prefix', 'NodeType', 'ParentNode', 'OwnerDocument', 'IsEmpty', 'Attributes', 'HasAttributes', 'SchemaInfo', 'InnerXml', 'InnerText', 'NextSibling', 'PreviousSibling', 'ChildNodes', 'FirstChild', 'LastChild', 'HasChildNodes', 'IsReadOnly', 'OuterXml', 'BaseURI', 'PreviousText')
|
||||
foreach ($Setting in $GPO.DataSet) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
}
|
||||
$SettingName = $Setting.Name -split ":"
|
||||
$CreateGPO['CreatedTime'] = $GPO.CreatedTime # : 06.06.2020 18:03:36
|
||||
$CreateGPO['ModifiedTime'] = $GPO.ModifiedTime # : 17.06.2020 16:08:10
|
||||
$CreateGPO['ReadTime'] = $GPO.ReadTime # : 13.08.2020 10:15:37
|
||||
$CreateGPO['SecurityDescriptor'] = $GPO.SecurityDescriptor # : SecurityDescriptor
|
||||
$CreateGPO['FilterDataAvailable'] = $GPO.FilterDataAvailable # : True
|
||||
|
||||
$Name = $SettingName[1]
|
||||
#$Name = Format-ToTitleCase -Text $Setting.Name -RemoveWhiteSpace -RemoveChar ',', '-', "'", '\(', '\)', ':'
|
||||
$CreateGPO['Name'] = $Name # $Setting.Name
|
||||
#$CreateGPO['GPOSettingOrder'] = $Setting.GPOSettingOrder
|
||||
|
||||
#foreach ($Property in ($Setting.Properties | Get-Member -MemberType Properties).Name) {
|
||||
|
||||
ConvertTo-XMLNested -CreateGPO $CreateGPO -Setting $Setting -SkipNames $SkipNames #-Name $Name
|
||||
<#
|
||||
$Properties = $Setting.PSObject.Properties.Name | Where-Object { $_ -notin $SkipNames }
|
||||
foreach ($Property in $Properties) {
|
||||
If ($Property -eq 'Value') {
|
||||
if ($Setting.$Property) {
|
||||
#$SubProperties = $Setting.$Property.PSObject.Properties.Name
|
||||
if ($Setting.$Property.Name) {
|
||||
$Name = $Setting.$Property.Name
|
||||
} else {
|
||||
$Name = 'Value'
|
||||
}
|
||||
if ($Setting.$Property.Number) {
|
||||
$CreateGPO[$Name] = $Setting.$Property.Number
|
||||
} elseif ($Setting.$Property.String) {
|
||||
$CreateGPO[$Name] = $Setting.$Property.String
|
||||
} else {
|
||||
throw
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$Name = Format-CamelCaseToDisplayName -Text $Property #-RemoveWhiteSpace -RemoveChar ',', '-', "'", '\(', '\)', ':'
|
||||
if ($Setting.$Property -is [System.Xml.XmlElement]) {
|
||||
$SubPropeties = $Setting.$Property.PSObject.Properties.Name | Where-Object { $_ -notin $SkipNames }
|
||||
|
||||
|
||||
|
||||
} else {
|
||||
$CreateGPO[$Name] = $Setting.$Property
|
||||
}
|
||||
}
|
||||
}
|
||||
#>
|
||||
|
||||
|
||||
$CreateGPO['Filters'] = $Setting.Filters
|
||||
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,45 @@
|
||||
function ConvertTo-XMLGenericSecuritySettings {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[string[]] $Category
|
||||
)
|
||||
$SkipNames = ('Name', 'LocalName', 'NamespaceURI', 'Prefix', 'NodeType', 'ParentNode', 'OwnerDocument', 'IsEmpty', 'Attributes', 'HasAttributes', 'SchemaInfo', 'InnerXml', 'InnerText', 'NextSibling', 'PreviousSibling', 'Value', 'ChildNodes', 'FirstChild', 'LastChild', 'HasChildNodes', 'IsReadOnly', 'OuterXml', 'BaseURI', 'PreviousText')
|
||||
$UsedNames = [System.Collections.Generic.List[string]]::new()
|
||||
[Array] $Settings = foreach ($Cat in $Category) {
|
||||
$GPO.DataSet | Where-Object { $null -ne $_.$Cat }
|
||||
}
|
||||
|
||||
if ($Settings.Count -gt 0) {
|
||||
foreach ($Cat in $Category) {
|
||||
foreach ($Setting in $Settings.$Cat) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
}
|
||||
#$Name = Format-ToTitleCase -Text $Setting.Name -RemoveWhiteSpace -RemoveChar ',', '-', "'", '\(', '\)', ':'
|
||||
$CreateGPO['Name'] = $Setting.Name
|
||||
$CreateGPO['GPOSettingOrder'] = $Setting.GPOSettingOrder
|
||||
#foreach ($Property in ($Setting.Properties | Get-Member -MemberType Properties).Name) {
|
||||
|
||||
$Properties = $Setting.Properties.PSObject.Properties.Name | Where-Object { $_ -notin $SkipNames }
|
||||
foreach ($Property in $Properties) {
|
||||
|
||||
$Name = Format-CamelCaseToDisplayName -Text $Property #-RemoveWhiteSpace -RemoveChar ',', '-', "'", '\(', '\)', ':'
|
||||
$CreateGPO[$Name] = $Setting.Properties.$Property
|
||||
}
|
||||
$CreateGPO['Filters'] = $Setting.Filters
|
||||
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,126 @@
|
||||
function ConvertTo-XMLLocalGroups {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
|
||||
if ($SingleObject) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Count = 0
|
||||
Settings = $null
|
||||
}
|
||||
if (-not $GPO.DataSet.Group) {
|
||||
continue
|
||||
}
|
||||
[Array] $CreateGPO['Settings'] = foreach ($Group in $GPO.DataSet.Group) {
|
||||
# We're mostly interested in Members
|
||||
[Array] $Members = foreach ($Member in $Group.Properties.Members.Member) {
|
||||
[ordered] @{
|
||||
MemberName = $Member.Name
|
||||
MemberAction = $Member.Action
|
||||
MemberSID = $Member.SID
|
||||
}
|
||||
}
|
||||
# if we have no members we create dummy object to make sure we can use foreach below
|
||||
if ($Members.Count -eq 0) {
|
||||
$Members = @(
|
||||
[ordered] @{
|
||||
MemberName = $null
|
||||
MemberAction = $null
|
||||
MemberSID = $null
|
||||
}
|
||||
)
|
||||
}
|
||||
foreach ($Member in $Members) {
|
||||
$GroupObject = [ordered]@{
|
||||
Changed = [DateTime] $Group.Changed
|
||||
GPOSettingOrder = $Group.GPOSettingOrder
|
||||
Name = $Group.name
|
||||
Action = $Script:Actions["$($Group.Properties.action)"]
|
||||
GroupName = $Group.Properties.groupName #: Administrators (built -in )
|
||||
NewName = $Group.Properties.newName #:
|
||||
Description = $Group.Properties.description #:
|
||||
DeleteAllUsers = if ($Group.Properties.deleteAllUsers -eq '1') { 'Enabled' } elseif ($Group.Properties.deleteAllUsers -eq '0') { 'Disabled' } else { $Group.Properties.deleteAllUsers };
|
||||
DeleteAllGroups = if ($Group.Properties.deleteAllGroups -eq '1') { 'Enabled' } elseif ($Group.Properties.deleteAllGroups -eq '0') { 'Disabled' } else { $Group.Properties.deleteAllGroups };
|
||||
RemoveAccounts = if ($Group.Properties.removeAccounts -eq '1') { 'Enabled' } elseif ($Group.Properties.removeAccounts -eq '0') { 'Disabled' } else { $Group.Properties.removeAccounts };
|
||||
GroupSid = $Group.Properties.groupSid #: S - 1 - 5 - 32 - 544
|
||||
}
|
||||
$Last = [ordered] @{
|
||||
#Uid = $Group.uid #: {8F435B0A-CD15-464E-85F3-B6A55B9E816A}: {8F435B0A-CD15-464E-85F3-B6A55B9E816A}
|
||||
RunInLoggedOnUserSecurityContext = if ($Group.userContext -eq '1') { 'Enabled' } elseif ($Group.userContext -eq '0') { 'Disabled' } else { $Group.userContext };
|
||||
RemoveThisItemWhenItIsNoLongerApplied = if ($Group.removePolicy -eq '1') { 'Enabled' } elseif ($Group.removePolicy -eq '0') { 'Disabled' } else { $Group.removePolicy };
|
||||
Filters = $Group.Filters #::
|
||||
}
|
||||
# Merging GPO with Member
|
||||
$GroupObject = $GroupObject + $Member + $Last
|
||||
[PSCustomObject] $GroupObject
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Group in $GPO.DataSet.Group) {
|
||||
# We're mostly interested in Members
|
||||
[Array] $Members = foreach ($Member in $Group.Properties.Members.Member) {
|
||||
[ordered] @{
|
||||
MemberName = $Member.Name
|
||||
MemberAction = $Member.Action
|
||||
MemberSID = $Member.SID
|
||||
}
|
||||
}
|
||||
# if we have no members we create dummy object to make sure we can use foreach below
|
||||
if ($Members.Count -eq 0) {
|
||||
$Members = @(
|
||||
[ordered] @{
|
||||
MemberName = $null
|
||||
MemberAction = $null
|
||||
MemberSID = $null
|
||||
}
|
||||
)
|
||||
}
|
||||
foreach ($Member in $Members) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPO.GpoCategory #: SecuritySettings
|
||||
#GpoSettings = $GPO.GpoSettings #: SecurityOptions
|
||||
Changed = [DateTime] $Group.Changed
|
||||
GPOSettingOrder = $Group.GPOSettingOrder
|
||||
Name = $Group.name
|
||||
Action = $Script:Actions["$($Group.Properties.action)"]
|
||||
GroupName = $Group.Properties.groupName #: Administrators (built -in )
|
||||
NewName = $Group.Properties.newName #:
|
||||
Description = $Group.Properties.description #:
|
||||
DeleteAllUsers = if ($Group.Properties.deleteAllUsers -eq '1') { 'Enabled' } elseif ($Group.Properties.deleteAllUsers -eq '0') { 'Disabled' } else { $Group.Properties.deleteAllUsers };
|
||||
DeleteAllGroups = if ($Group.Properties.deleteAllGroups -eq '1') { 'Enabled' } elseif ($Group.Properties.deleteAllGroups -eq '0') { 'Disabled' } else { $Group.Properties.deleteAllGroups };
|
||||
RemoveAccounts = if ($Group.Properties.removeAccounts -eq '1') { 'Enabled' } elseif ($Group.Properties.removeAccounts -eq '0') { 'Disabled' } else { $Group.Properties.removeAccounts };
|
||||
GroupSid = $Group.Properties.groupSid #: S - 1 - 5 - 32 - 544
|
||||
}
|
||||
$Last = [ordered] @{
|
||||
# Uid = $Group.uid #: {8F435B0A-CD15-464E-85F3-B6A55B9E816A}: {8F435B0A-CD15-464E-85F3-B6A55B9E816A}
|
||||
RunInLoggedOnUserSecurityContext = if ($Group.userContext -eq '1') { 'Enabled' } elseif ($Group.userContext -eq '0') { 'Disabled' } else { $Group.userContext };
|
||||
RemoveThisItemWhenItIsNoLongerApplied = if ($Group.removePolicy -eq '1') { 'Enabled' } elseif ($Group.removePolicy -eq '0') { 'Disabled' } else { $Group.removePolicy };
|
||||
Filters = $Group.Filters #::
|
||||
}
|
||||
# Merging GPO with Member
|
||||
$CreateGPO = $CreateGPO + $Member + $Last
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,74 @@
|
||||
function ConvertTo-XMLLocalUser {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
if ($SingleObject) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Count = 0
|
||||
Settings = $null
|
||||
}
|
||||
if (-not $GPO.DataSet.User) {
|
||||
continue
|
||||
}
|
||||
[Array] $CreateGPO['Settings'] = foreach ($User in $GPO.DataSet.User) {
|
||||
[PSCustomObject] @{
|
||||
Changed = [DateTime] $User.Changed
|
||||
GPOSettingOrder = $User.GPOSettingOrder
|
||||
Action = $Script:Actions["$($User.Properties.action)"]
|
||||
UserName = $User.Properties.userName
|
||||
NewName = $User.Properties.newName
|
||||
FullName = $User.Properties.fullName
|
||||
Description = $User.Properties.description
|
||||
Password = $User.Properties.cpassword
|
||||
MustChangePasswordAtNextLogon = if ($User.Properties.changeLogon -eq '1') { $true } elseif ($User.Properties.changeLogon -eq '0') { $false } else { $User.Properties.changeLogon };
|
||||
CannotChangePassword = if ($User.Properties.noChange -eq '1') { $true } elseif ($User.Properties.noChange -eq '0') { $false } else { $User.Properties.noChange };
|
||||
PasswordNeverExpires = if ($User.Properties.neverExpires -eq '1') { $true } elseif ($User.Properties.neverExpires -eq '0') { $false } else { $User.Properties.neverExpires };
|
||||
AccountIsDisabled = if ($User.Properties.acctDisabled -eq '1') { $true } elseif ($User.Properties.acctDisabled -eq '0') { $false } else { $User.Properties.acctDisabled };
|
||||
AccountExpires = try { [DateTime] $User.Properties.expires } catch { $User.Properties.expires };
|
||||
SubAuthority = $User.Properties.subAuthority
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($User in $GPO.DataSet.User) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPO.GpoCategory #: SecuritySettings
|
||||
#GpoSettings = $GPO.GpoSettings #: SecurityOptions
|
||||
Changed = [DateTime] $User.Changed
|
||||
GPOSettingOrder = $User.GPOSettingOrder
|
||||
Action = $Script:Actions["$($User.Properties.action)"]
|
||||
UserName = $User.Properties.userName
|
||||
NewName = $User.Properties.newName
|
||||
FullName = $User.Properties.fullName
|
||||
Description = $User.Properties.description
|
||||
Password = $User.Properties.cpassword
|
||||
MustChangePasswordAtNextLogon = if ($User.Properties.changeLogon -eq '1') { $true } elseif ($User.Properties.changeLogon -eq '0') { $false } else { $User.Properties.changeLogon };
|
||||
CannotChangePassword = if ($User.Properties.noChange -eq '1') { $true } elseif ($User.Properties.noChange -eq '0') { $false } else { $User.Properties.noChange };
|
||||
PasswordNeverExpires = if ($User.Properties.neverExpires -eq '1') { $true } elseif ($User.Properties.neverExpires -eq '0') { $false } else { $User.Properties.neverExpires };
|
||||
AccountIsDisabled = if ($User.Properties.acctDisabled -eq '1') { $true } elseif ($User.Properties.acctDisabled -eq '0') { $false } else { $User.Properties.acctDisabled };
|
||||
AccountExpires = try { [DateTime] $User.Properties.expires } catch { $User.Properties.expires };
|
||||
SubAuthority = $User.Properties.subAuthority
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
function ConvertTo-XMLNested {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[System.Collections.IDictionary] $CreateGPO,
|
||||
[System.Xml.XmlElement] $Setting,
|
||||
[string[]] $SkipNames,
|
||||
[string] $Name
|
||||
)
|
||||
|
||||
$Properties = $Setting.PSObject.Properties.Name | Where-Object { $_ -notin $SkipNames }
|
||||
$TempName = $Name
|
||||
foreach ($Property in $Properties) {
|
||||
If ($Property -eq 'Value') {
|
||||
if ($Setting.$Property) {
|
||||
#$SubProperties = $Setting.$Property.PSObject.Properties.Name
|
||||
if ($Setting.$Property.Name) {
|
||||
$Name = $Setting.$Property.Name
|
||||
} else {
|
||||
if (-not $Name) {
|
||||
$Name = 'Value'
|
||||
}
|
||||
}
|
||||
if ($Setting.$Property.Number) {
|
||||
$CreateGPO[$Name] = $Setting.$Property.Number
|
||||
} elseif ($Setting.$Property.String) {
|
||||
$CreateGPO[$Name] = $Setting.$Property.String
|
||||
} else {
|
||||
$CreateGPO[$Name] = $Setting.$Property
|
||||
|
||||
#throw
|
||||
}
|
||||
}
|
||||
} else {
|
||||
$Name = -join ($Name, $Property)
|
||||
$Name = Format-CamelCaseToDisplayName -Text $Name #-RemoveWhiteSpace -RemoveChar ',', '-', "'", '\(', '\)', ':'
|
||||
if ($Setting.$Property -is [System.Xml.XmlElement]) {
|
||||
#$SubPropeties = $Setting.$Property.PSObject.Properties.Name | Where-Object { $_ -notin $SkipNames }
|
||||
|
||||
|
||||
ConvertTo-XMLNested -Setting $Setting.$Property -CreateGPO $CreateGPO -Name $Name -SkipNames $SkipNames
|
||||
|
||||
|
||||
} else {
|
||||
$CreateGPO[$Name] = $Setting.$Property
|
||||
}
|
||||
}
|
||||
$Name = $TempName
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,61 @@
|
||||
function ConvertTo-XMLPolicies {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
if ($SingleObject) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Count = 0
|
||||
Settings = $null
|
||||
}
|
||||
[Array] $CreateGPO['Settings'] = foreach ($Policy in $GPO.DataSet) {
|
||||
[PSCustomObject] @{
|
||||
PolicyName = $Policy.Name
|
||||
PolicyState = $Policy.State
|
||||
PolicyCategory = $Policy.Category
|
||||
PolicySupported = $Policy.Supported
|
||||
PolicyExplain = $Policy.Explain
|
||||
PolicyText = $Policy.Text
|
||||
PolicyCheckBox = $Policy.CheckBox
|
||||
PolicyDropDownList = $Policy.DropDownList
|
||||
PolicyEditText = $Policy.EditText
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Policy in $GPO.DataSet) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
PolicyName = $Policy.Name
|
||||
PolicyState = $Policy.State
|
||||
PolicyCategory = $Policy.Category
|
||||
PolicySupported = $Policy.Supported
|
||||
PolicyExplain = $Policy.Explain
|
||||
PolicyText = $Policy.Text
|
||||
PolicyCheckBox = $Policy.CheckBox
|
||||
PolicyDropDownList = $Policy.DropDownList
|
||||
PolicyEditText = $Policy.EditText
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,51 @@
|
||||
function ConvertTo-XMLPrinter {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
if ($SingleObject) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Count = 0
|
||||
Settings = $null
|
||||
}
|
||||
[Array] $CreateGPO['Settings'] = @(
|
||||
foreach ($Type in @('SharedPrinter', 'PortPrinter', 'LocalPrinter')) {
|
||||
foreach ($Entry in $GPO.DataSet.$Type) {
|
||||
if ($Entry) {
|
||||
ConvertTo-XMLPrinterInternal -GPO $GPO -Entry $Entry -Type $Type -Limited
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($GPO.GpoCategory -eq 'PrinterConnectionSettings') {
|
||||
foreach ($Entry in $GPO.DataSet) {
|
||||
ConvertTo-XMLPrinterInternal -GPO $GPO -Entry $Entry -Type 'PrinterConnections' -Limited
|
||||
}
|
||||
}
|
||||
)
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Type in @('SharedPrinter', 'PortPrinter', 'LocalPrinter')) {
|
||||
foreach ($Entry in $GPO.DataSet.$Type) {
|
||||
if ($Entry) {
|
||||
ConvertTo-XMLPrinterInternal -GPO $GPO -Entry $Entry -Type $Type
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($GPO.GpoCategory -eq 'PrinterConnectionSettings') {
|
||||
foreach ($Entry in $GPO.DataSet) {
|
||||
ConvertTo-XMLPrinterInternal -GPO $GPO -Entry $Entry -Type 'PrinterConnections'
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,95 @@
|
||||
function ConvertTo-XMLPrinterInternal {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
$Entry,
|
||||
$Type,
|
||||
[switch] $Limited
|
||||
)
|
||||
if ($Limited) {
|
||||
$CreateGPO = [ordered]@{
|
||||
Changed = try { [DateTime] $Entry.changed } catch { $Entry.Changed };
|
||||
#uid = $Entry.uid
|
||||
BypassErrors = if ($Entry.bypassErrors -eq '1') { $true } else { $false };
|
||||
GPOSettingOrder = $Entry.GPOSettingOrder
|
||||
Filter = $Entry.Filter
|
||||
type = $Type
|
||||
Action = $null #$Script:Actions["$($Entry.Properties.action)"]
|
||||
Comment = $Entry.Properties.comment
|
||||
Path = if ($Entry.Properties.path) { $Entry.Properties.Path } elseif ($Entry.Path) { $Entry.Path } else { '' }
|
||||
Location = $Entry.Properties.location
|
||||
|
||||
HostName = $Entry.Properties.ipAddress #: 10.42.20.204
|
||||
LocalName = $Entry.Properties.localName #: CZ02PRT00017
|
||||
UseDNS = if ($Entry.Properties.useDNS -eq '1') { $true } elseif ($Entry.Properties.useDNS -eq '0') { $false } else { $Entry.Properties.useDNS };
|
||||
UseIPv6 = if ($Entry.Properties.useIPv6 -eq '1') { $true } elseif ($Entry.Properties.useIPv6 -eq '0') { $false } else { $Entry.Properties.useIPv6 };
|
||||
Default = if ($Entry.Properties.default -eq '1') { $true } elseif ($Entry.Properties.default -eq '0') { $false } else { $Entry.Properties.default };
|
||||
SkipLocal = if ($Entry.Properties.skipLocal -eq '1') { $true } elseif ($Entry.Properties.skipLocal -eq '0') { $false } else { $Entry.Properties.skipLocal };
|
||||
DeleteAllShared = if ($Entry.Properties.deleteAll -eq '1') { $true } elseif ($Entry.Properties.deleteAll -eq '0') { $false } else { $Entry.Properties.deleteAll };
|
||||
Persistent = if ($Entry.Properties.persistent -eq '1') { $true } elseif ($Entry.Properties.persistent -eq '0') { $false } else { $Entry.Properties.persistent };
|
||||
DeleteMaps = if ($Entry.Properties.deleteMaps -eq '1') { $true } elseif ($Entry.Properties.deleteMaps -eq '0') { $false } else { $Entry.Properties.deleteMaps };
|
||||
LPRSettingsQueueName = $Entry.Properties.lprQueue #:
|
||||
|
||||
Protocol = $Entry.Properties.protocol #: PROTOCOL_RAWTCP_TYPE
|
||||
PortNumber = if ($Entry.Properties.portNumber) { $Entry.Properties.portNumber } else { $Entry.Properties.port }
|
||||
DoubleSpool = if ($Entry.Properties.doubleSpool -eq '1') { $true } elseif ($Entry.Properties.doubleSpool -eq '0') { $false } else { $Entry.Properties.doubleSpool };
|
||||
|
||||
SNMPEnabled = if ($Entry.Properties.snmpEnabled -eq '1') { $true } elseif ($Entry.Properties.snmpEnabled -eq '0') { $false } else { $Entry.Properties.snmpEnabled };
|
||||
SNMPCommunityName = $Entry.Properties.snmpCommunity #: public
|
||||
SNMPDeviceIndex = $Entry.Properties.snmpDevIndex #: 1
|
||||
}
|
||||
if ($Entry.Properties.Action) {
|
||||
$CreateGPO['Action'] = $Script:Actions["$($Entry.Properties.action)"]
|
||||
} else {
|
||||
$CreateGPO['Action'] = 'Deploy'
|
||||
}
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
GpoCategory = $GPO.GpoCategory
|
||||
GpoSettings = $GPO.GpoSettings
|
||||
Changed = try { [DateTime] $Entry.changed } catch { $Entry.Changed };
|
||||
#uid = $Entry.uid
|
||||
BypassErrors = if ($Entry.bypassErrors -eq '1') { $true } else { $false };
|
||||
GPOSettingOrder = $Entry.GPOSettingOrder
|
||||
Filter = $Entry.Filter
|
||||
type = $Type
|
||||
Action = $null #$Script:Actions["$($Entry.Properties.action)"]
|
||||
Comment = $Entry.Properties.comment
|
||||
Path = if ($Entry.Properties.path) { $Entry.Properties.Path } elseif ($Entry.Path) { $Entry.Path } else { '' }
|
||||
Location = $Entry.Properties.location
|
||||
|
||||
HostName = $Entry.Properties.ipAddress #: 10.42.20.204
|
||||
LocalName = $Entry.Properties.localName #: CZ02PRT00017
|
||||
UseDNS = if ($Entry.Properties.useDNS -eq '1') { $true } elseif ($Entry.Properties.useDNS -eq '0') { $false } else { $Entry.Properties.useDNS };
|
||||
UseIPv6 = if ($Entry.Properties.useIPv6 -eq '1') { $true } elseif ($Entry.Properties.useIPv6 -eq '0') { $false } else { $Entry.Properties.useIPv6 };
|
||||
Default = if ($Entry.Properties.default -eq '1') { $true } elseif ($Entry.Properties.default -eq '0') { $false } else { $Entry.Properties.default };
|
||||
SkipLocal = if ($Entry.Properties.skipLocal -eq '1') { $true } elseif ($Entry.Properties.skipLocal -eq '0') { $false } else { $Entry.Properties.skipLocal };
|
||||
DeleteAllShared = if ($Entry.Properties.deleteAll -eq '1') { $true } elseif ($Entry.Properties.deleteAll -eq '0') { $false } else { $Entry.Properties.deleteAll };
|
||||
Persistent = if ($Entry.Properties.persistent -eq '1') { $true } elseif ($Entry.Properties.persistent -eq '0') { $false } else { $Entry.Properties.persistent };
|
||||
DeleteMaps = if ($Entry.Properties.deleteMaps -eq '1') { $true } elseif ($Entry.Properties.deleteMaps -eq '0') { $false } else { $Entry.Properties.deleteMaps };
|
||||
LPRSettingsQueueName = $Entry.Properties.lprQueue #:
|
||||
|
||||
Protocol = $Entry.Properties.protocol #: PROTOCOL_RAWTCP_TYPE
|
||||
PortNumber = if ($Entry.Properties.portNumber) { $Entry.Properties.portNumber } else { $Entry.Properties.port }
|
||||
DoubleSpool = if ($Entry.Properties.doubleSpool -eq '1') { $true } elseif ($Entry.Properties.doubleSpool -eq '0') { $false } else { $Entry.Properties.doubleSpool };
|
||||
|
||||
SNMPEnabled = if ($Entry.Properties.snmpEnabled -eq '1') { $true } elseif ($Entry.Properties.snmpEnabled -eq '0') { $false } else { $Entry.Properties.snmpEnabled };
|
||||
SNMPCommunityName = $Entry.Properties.snmpCommunity #: public
|
||||
SNMPDeviceIndex = $Entry.Properties.snmpDevIndex #: 1
|
||||
}
|
||||
if ($Entry.Properties.Action) {
|
||||
$CreateGPO['Action'] = $Script:Actions["$($Entry.Properties.action)"]
|
||||
} else {
|
||||
$CreateGPO['Action'] = 'Deploy'
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
function ConvertTo-XMLRegistryAutologon {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO
|
||||
)
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
AutoAdminLogon = $null
|
||||
DefaultDomainName = $null
|
||||
DefaultUserName = $null
|
||||
DefaultPassword = $null
|
||||
DateChangedAutoAdminLogon = $null
|
||||
DateChangedDefaultDomainName = $null
|
||||
DateChangedDefaultUserName = $null
|
||||
DateChangedDefaultPassword = $null
|
||||
}
|
||||
foreach ($Registry in $GPO.DataSet.Registry) {
|
||||
if ($Registry.Properties.Key -eq 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon') {
|
||||
if ($Registry.Properties.Name -eq 'AutoAdminLogon') {
|
||||
$CreateGPO['AutoAdminLogon'] = [bool] $Registry.Properties.value
|
||||
$CreateGPO['DateChangedAutoAdminLogon'] = [DateTime] $Registry.changed
|
||||
} elseif ($Registry.Properties.Name -eq 'DefaultDomainName') {
|
||||
$CreateGPO['DefaultDomainName'] = $Registry.Properties.value
|
||||
$CreateGPO['DateChangedDefaultDomainName'] = [DateTime] $Registry.changed
|
||||
} elseif ($Registry.Properties.Name -eq 'DefaultUserName') {
|
||||
$CreateGPO['DefaultUserName'] = $Registry.Properties.value
|
||||
$CreateGPO['DateChangedDefaultUserName'] = [DateTime] $Registry.changed
|
||||
} elseif ($Registry.Properties.Name -eq 'DefaultPassword') {
|
||||
$CreateGPO['DefaultPassword'] = $Registry.Properties.value
|
||||
$CreateGPO['DateChangedDefaultPassword'] = [DateTime] $Registry.changed
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($null -ne $CreateGPO['AutoAdminLogon'] -or
|
||||
$null -ne $CreateGPO['DefaultDomainName'] -or
|
||||
$null -ne $CreateGPO['DefaultUserName'] -or
|
||||
$null -ne $CreateGPO['DefaultPassword']
|
||||
) {
|
||||
$CreateGPO['Linked'] = $GPOEntry.Linked
|
||||
$CreateGPO['LinksCount'] = $GPOEntry.LinksCount
|
||||
$CreateGPO['Links'] = $GPOEntry.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,49 @@
|
||||
function ConvertTo-XMLRegistryAutologonOnReport {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO
|
||||
)
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
AutoAdminLogon = $null
|
||||
DefaultDomainName = $null
|
||||
DefaultUserName = $null
|
||||
DefaultPassword = $null
|
||||
DateChangedAutoAdminLogon = $null
|
||||
DateChangedDefaultDomainName = $null
|
||||
DateChangedDefaultUserName = $null
|
||||
DateChangedDefaultPassword = $null
|
||||
}
|
||||
foreach ($Registry in $GPO.Settings) {
|
||||
if ($Registry.Key -eq 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon') {
|
||||
if ($Registry.Name -eq 'AutoAdminLogon') {
|
||||
$CreateGPO['AutoAdminLogon'] = [bool] $Registry.value
|
||||
$CreateGPO['DateChangedAutoAdminLogon'] = [DateTime] $Registry.changed
|
||||
} elseif ($Registry.Name -eq 'DefaultDomainName') {
|
||||
$CreateGPO['DefaultDomainName'] = $Registry.value
|
||||
$CreateGPO['DateChangedDefaultDomainName'] = [DateTime] $Registry.changed
|
||||
} elseif ($Registry.Name -eq 'DefaultUserName') {
|
||||
$CreateGPO['DefaultUserName'] = $Registry.value
|
||||
$CreateGPO['DateChangedDefaultUserName'] = [DateTime] $Registry.changed
|
||||
} elseif ($Registry.Name -eq 'DefaultPassword') {
|
||||
$CreateGPO['DefaultPassword'] = $Registry.value
|
||||
$CreateGPO['DateChangedDefaultPassword'] = [DateTime] $Registry.changed
|
||||
}
|
||||
}
|
||||
}
|
||||
if ($null -ne $CreateGPO['AutoAdminLogon'] -or
|
||||
$null -ne $CreateGPO['DefaultDomainName'] -or
|
||||
$null -ne $CreateGPO['DefaultUserName'] -or
|
||||
$null -ne $CreateGPO['DefaultPassword']
|
||||
) {
|
||||
$CreateGPO['Linked'] = $GPO.Linked #: True
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount #: 1
|
||||
$CreateGPO['Links'] = $GPO.Links #: area1.local
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,76 @@
|
||||
function ConvertTo-XMLRegistryInternetExplorerZones {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO
|
||||
)
|
||||
foreach ($Registry in $GPO.Settings) {
|
||||
$Keys = @(
|
||||
'Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\'
|
||||
'Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\EscDomains\'
|
||||
)
|
||||
$Found = $false
|
||||
foreach ($Key in $Keys) {
|
||||
if ($Registry.Key -like "$Key*") {
|
||||
$Found = $true
|
||||
}
|
||||
}
|
||||
if ($Found -eq $false) {
|
||||
continue
|
||||
}
|
||||
# https://support.microsoft.com/en-us/help/182569/internet-explorer-security-zones-registry-entries-for-advanced-users
|
||||
if ($Registry.Key -like 'Software\Microsoft\Windows\CurrentVersion\Internet Settings\ZoneMap\Domains\*') {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
}
|
||||
$CreateGPO['Disabled'] = $Registry.Disabled
|
||||
if ($Registry.Key -like '*EscDomains*') {
|
||||
$CreateGPO['Configuration'] = 'Enhanced Security Configuration (ESC)'
|
||||
} else {
|
||||
$CreateGPO['Configuration'] = 'Domains'
|
||||
}
|
||||
if ($Registry.Hive -eq 'HKEY_CURRENT_USER') {
|
||||
$CreateGPO['Type'] = 'User Policy'
|
||||
} elseif ($Registry.Hive -eq 'HKEY_LOCAL_MACHINE') {
|
||||
$CreateGPO['Type'] = 'Computer Policy'
|
||||
} else {
|
||||
$CreateGPO['Type'] = $Registry.Hive
|
||||
}
|
||||
if ($Registry.Value -eq '00000000') {
|
||||
$CreateGPO['Zone'] = 'My Computer (0)'
|
||||
} elseif ($Registry.Value -eq '00000001') {
|
||||
$CreateGPO['Zone'] = 'Local Intranet Zone (1)'
|
||||
} elseif ($Registry.Value -eq '00000002') {
|
||||
$CreateGPO['Zone'] = 'Trusted Sites Zone (2)'
|
||||
} elseif ($Registry.Value -eq '00000003') {
|
||||
$CreateGPO['Zone'] = 'Internet Zone (3)'
|
||||
} elseif ($Registry.Value -eq '00000004') {
|
||||
$CreateGPO['Zone'] = 'Restricted Sites Zone (4)'
|
||||
} else {
|
||||
$CreateGPO['Zone'] = $Registry.Value
|
||||
}
|
||||
[string] $FullKey = foreach ($Key in $Keys) {
|
||||
if ($Registry.Key -like "$Key*") {
|
||||
$Registry.Key.Replace($Key, '')
|
||||
}
|
||||
}
|
||||
$DomainSplit = $FullKey.Split('\')
|
||||
$Reversed = for ($i = $DomainSplit.Count - 1; $i -ge 0; $i--) {
|
||||
$DomainSplit[$i]
|
||||
}
|
||||
if ($Registry.Name -eq '*') {
|
||||
$CreateGPO['DomainZone'] = $Reversed -join '.'
|
||||
} else {
|
||||
$CreateGPO['DomainZone'] = -join ($Registry.Name, '://', ($Reversed -join '.'))
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,28 @@
|
||||
function ConvertTo-XMLRegistrySettings {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
if ($SingleObject) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Count = 0
|
||||
Settings = $null
|
||||
}
|
||||
|
||||
[Array] $CreateGPO['Settings'] = Get-XMLNestedRegistry -GPO $GPO -DataSet $GPO.DataSet
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
Get-XMLNestedRegistry -GPO $GPO -DataSet $GPO.DataSet
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
function ConvertTo-XMLScripts {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
if ($SingleObject) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Count = 0
|
||||
Settings = $null
|
||||
}
|
||||
[Array] $CreateGPO['Settings'] = foreach ($Script in $GPO.DataSet) {
|
||||
[PSCustomObject] @{
|
||||
Type = $GPO.DataSet.Type
|
||||
Command = $GPO.DataSet.Command
|
||||
Parameters = $GPO.DataSet.Parameters
|
||||
Order = $GPO.DataSet.Order
|
||||
RunOrder = $GPO.DataSet.RunOrder
|
||||
}
|
||||
}
|
||||
$CreateGPO['DataCount'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Script in $GPO.DataSet) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Type = $Script.Type
|
||||
Command = $Script.Command
|
||||
Parameters = $Script.Parameters
|
||||
Order = $Script.Order
|
||||
RunOrder = $Script.RunOrder
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,65 @@
|
||||
function ConvertTo-XMLSecurityOptions {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
if ($SingleObject) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Count = 0
|
||||
Settings = $null
|
||||
}
|
||||
[Array] $CreateGPO['Settings'] = foreach ($Entry in $GPO.DataSet) {
|
||||
$Object = [ordered] @{}
|
||||
$Object['KeyName'] = $Entry.KeyName
|
||||
$Object['KeyDisplayName'] = $Entry.Display.Name
|
||||
$Object['KeyDisplayUnits'] = $Entry.Display.Units
|
||||
$Object['KeyDisplayBoolean'] = try { [bool]::Parse($Entry.Display.DisplayBoolean) } catch { $null };
|
||||
$Object['KeyDisplayString'] = $Entry.Display.DisplayString
|
||||
$Object['SystemAccessPolicyName'] = $Entry.SystemAccessPolicyName
|
||||
if ($Entry.SettingString) {
|
||||
$Object['KeyValue'] = $Entry.SettingString
|
||||
} else {
|
||||
$Object['KeyValue'] = $Entry.SettingNumber
|
||||
}
|
||||
[PSCustomObject] $Object
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Entry in $GPO.DataSet) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
}
|
||||
$CreateGPO['KeyName'] = $Entry.KeyName
|
||||
$CreateGPO['KeyDisplayName'] = $Entry.Display.Name
|
||||
$CreateGPO['KeyDisplayUnits'] = $Entry.Display.Units
|
||||
$CreateGPO['KeyDisplayBoolean'] = try { [bool]::Parse($Entry.Display.DisplayBoolean) } catch { $null };
|
||||
$CreateGPO['KeyDisplayString'] = $Entry.Display.DisplayString
|
||||
$CreateGPO['SystemAccessPolicyName'] = $Entry.SystemAccessPolicyName
|
||||
if ($Entry.SettingString) {
|
||||
$CreateGPO['KeyValue'] = $Entry.SettingString
|
||||
} else {
|
||||
$CreateGPO['KeyValue'] = $Entry.SettingNumber
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,87 @@
|
||||
function ConvertTo-XMLSoftwareInstallation {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
if ($SingleObject) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Count = 0
|
||||
Settings = $null
|
||||
}
|
||||
[Array] $CreateGPO['Settings'] = foreach ($MsiInstallerr in $GPO.DataSet) {
|
||||
[PSCustomObject] @{
|
||||
Identifier = $MsiInstallerr.Identifier #: { 10495e9e-79c1-4a32-b278-a24cd495437f }
|
||||
Name = $MsiInstallerr.Name #: Local Administrator Password Solution (2)
|
||||
Path = $MsiInstallerr.Path #: \\area1.local\SYSVOL\area1.local\Policies\ { 5F5042A0-008F-45E3-8657-79C87BD002E3 }\LAPS.x64.msi
|
||||
MajorVersion = $MsiInstallerr.MajorVersion #: 6
|
||||
MinorVersion = $MsiInstallerr.MinorVersion #: 2
|
||||
LanguageId = $MsiInstallerr.LanguageId #: 1033
|
||||
Architecture = $MsiInstallerr.Architecture #: 9
|
||||
IgnoreLanguage = if ($MsiInstallerr.IgnoreLanguage -eq 'true') { $true } else { $false } #: false
|
||||
Allowx86Onia64 = if ($MsiInstallerr.Allowx86Onia64 -eq 'true') { $true } else { $false } #: true
|
||||
SupportURL = $MsiInstallerr.SupportURL #:
|
||||
AutoInstall = if ($MsiInstallerr.AutoInstall -eq 'true') { $true } else { $false } #: true
|
||||
DisplayInARP = if ($MsiInstallerr.DisplayInARP -eq 'true') { $true } else { $false } #: true
|
||||
IncludeCOM = if ($MsiInstallerr.IncludeCOM -eq 'true') { $true } else { $false } #: true
|
||||
SecurityDescriptor = $MsiInstallerr.SecurityDescriptor #: SecurityDescriptor
|
||||
DeploymentType = $MsiInstallerr.DeploymentType #: Assign
|
||||
ProductId = $MsiInstallerr.ProductId #: { ea8cb806-c109 - 4700 - 96b4-f1f268e5036c }
|
||||
ScriptPath = $MsiInstallerr.ScriptPath #: \\area1.local\SysVol\area1.local\Policies\ { 5F5042A0-008F-45E3-8657-79C87BD002E3 }\Machine\Applications\ { EAC9B821-FB4D - 457A-806F-E5B528D1E41A }.aas
|
||||
DeploymentCount = $MsiInstallerr.DeploymentCount #: 0
|
||||
InstallationUILevel = $MsiInstallerr.InstallationUILevel #: Maximum
|
||||
Upgrades = if ($MsiInstallerr.Upgrades.Mandatory -eq 'true') { $true } else { $false } #: Upgrades
|
||||
UninstallUnmanaged = if ($MsiInstallerr.UninstallUnmanaged -eq 'true') { $true } else { $false } #: false
|
||||
LossOfScopeAction = $MsiInstallerr.LossOfScopeAction #: Unmanage
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($MsiInstallerr in $GPO.DataSet) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Identifier = $MsiInstallerr.Identifier #: { 10495e9e-79c1-4a32-b278-a24cd495437f }
|
||||
Name = $MsiInstallerr.Name #: Local Administrator Password Solution (2)
|
||||
Path = $MsiInstallerr.Path #: \\area1.local\SYSVOL\area1.local\Policies\ { 5F5042A0-008F-45E3-8657-79C87BD002E3 }\LAPS.x64.msi
|
||||
MajorVersion = $MsiInstallerr.MajorVersion #: 6
|
||||
MinorVersion = $MsiInstallerr.MinorVersion #: 2
|
||||
LanguageId = $MsiInstallerr.LanguageId #: 1033
|
||||
Architecture = $MsiInstallerr.Architecture #: 9
|
||||
IgnoreLanguage = if ($MsiInstallerr.IgnoreLanguage -eq 'true') { $true } else { $false } #: false
|
||||
Allowx86Onia64 = if ($MsiInstallerr.Allowx86Onia64 -eq 'true') { $true } else { $false } #: true
|
||||
SupportURL = $MsiInstallerr.SupportURL #:
|
||||
AutoInstall = if ($MsiInstallerr.AutoInstall -eq 'true') { $true } else { $false } #: true
|
||||
DisplayInARP = if ($MsiInstallerr.DisplayInARP -eq 'true') { $true } else { $false } #: true
|
||||
IncludeCOM = if ($MsiInstallerr.IncludeCOM -eq 'true') { $true } else { $false } #: true
|
||||
SecurityDescriptor = $MsiInstallerr.SecurityDescriptor #: SecurityDescriptor
|
||||
DeploymentType = $MsiInstallerr.DeploymentType #: Assign
|
||||
ProductId = $MsiInstallerr.ProductId #: { ea8cb806-c109 - 4700 - 96b4-f1f268e5036c }
|
||||
ScriptPath = $MsiInstallerr.ScriptPath #: \\area1.local\SysVol\area1.local\Policies\ { 5F5042A0-008F-45E3-8657-79C87BD002E3 }\Machine\Applications\ { EAC9B821-FB4D - 457A-806F-E5B528D1E41A }.aas
|
||||
DeploymentCount = $MsiInstallerr.DeploymentCount #: 0
|
||||
InstallationUILevel = $MsiInstallerr.InstallationUILevel #: Maximum
|
||||
Upgrades = if ($MsiInstallerr.Upgrades.Mandatory -eq 'true') { $true } else { $false } #: Upgrades
|
||||
UninstallUnmanaged = if ($MsiInstallerr.UninstallUnmanaged -eq 'true') { $true } else { $false } #: false
|
||||
LossOfScopeAction = $MsiInstallerr.LossOfScopeAction #: Unmanage
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,53 @@
|
||||
function ConvertTo-XMLSystemServices {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
if ($SingleObject) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Count = 0
|
||||
Settings = $null
|
||||
}
|
||||
[Array] $CreateGPO['Settings'] = foreach ($GPOEntry in $GPO.DataSet) {
|
||||
[PSCustomObject] @{
|
||||
ServiceName = $GPOEntry.Name
|
||||
ServiceStartUpMode = $GPOEntry.StartUpMode
|
||||
SecurityAuditingPresent = try { [bool]::Parse($GPOEntry.SecurityDescriptor.AuditingPresent.'#text') } catch { $null };
|
||||
SecurityPermissionsPresent = try { [bool]::Parse($GPOEntry.SecurityDescriptor.PermissionsPresent.'#text') } catch { $null };
|
||||
SecurityDescriptor = $GPOEntry.SecurityDescriptor
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($GPOEntry in $GPO.DataSet) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
ServiceName = $GPOEntry.Name
|
||||
ServiceStartUpMode = $GPOEntry.StartUpMode
|
||||
SecurityAuditingPresent = try { [bool]::Parse($GPOEntry.SecurityDescriptor.AuditingPresent.'#text') } catch { $null };
|
||||
SecurityPermissionsPresent = try { [bool]::Parse($GPOEntry.SecurityDescriptor.PermissionsPresent.'#text') } catch { $null };
|
||||
SecurityDescriptor = $GPOEntry.SecurityDescriptor
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,106 @@
|
||||
function ConvertTo-XMLSystemServicesNT {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
if ($SingleObject) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Count = 0
|
||||
Settings = $null
|
||||
}
|
||||
[Array] $CreateGPO['Settings'] = foreach ($Service in $GPO.DataSet.NTService) {
|
||||
[PSCustomObject] @{
|
||||
GPOSettingOrder = $Service.GPOSettingOrder
|
||||
#ServiceName = $Service.Name
|
||||
ServiceName = $Service.Properties.serviceName #: AppIDSvc: AppIDSvc
|
||||
ServiceStartupType = $Service.Properties.startupType #: NOCHANGE: NOCHANGE
|
||||
ServiceAction = $Service.Properties.serviceAction #: START: START
|
||||
Timeout = $Service.Properties.timeout #: 50: 50
|
||||
FirstFailure = $Service.Properties.firstFailure #: REBOOT: REBOOT
|
||||
SecondFailure = $Service.Properties.secondFailure #: REBOOT: REBOOT
|
||||
ThirdFailure = $Service.Properties.thirdFailure #: REBOOT: REBOOT
|
||||
ResetFailCountDelay = $Service.Properties.resetFailCountDelay #: 0: 0
|
||||
RestartComputerDelay = $Service.Properties.restartComputerDelay #: 60000: 60000
|
||||
Filter = $Service.Filter
|
||||
AccountName = $Service.Properties.accountName
|
||||
AllowServiceToInteractWithTheDesktop = if ($Service.Properties.interact -eq 1) { 'Yes' } elseif ($Service.Properties.interact -eq 0) { 'No' } else { $null }
|
||||
RunThisProgram = $Service.Properties.program
|
||||
CommandLineParameters = $Service.Properties.args
|
||||
AppendFailCountToEndOfCommandLine = if ($Service.Properties.append -eq 1) { 'Yes' } elseif ($Service.Properties.append -eq 0) { 'No' } else { $null }
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Service in $GPO.DataSet.NTService) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
GPOSettingOrder = $Service.GPOSettingOrder
|
||||
#ServiceName = $Service.Name
|
||||
ServiceName = $Service.Properties.serviceName #: AppIDSvc: AppIDSvc
|
||||
ServiceStartupType = $Service.Properties.startupType #: NOCHANGE: NOCHANGE
|
||||
ServiceAction = $Service.Properties.serviceAction #: START: START
|
||||
Timeout = $Service.Properties.timeout #: 50: 50
|
||||
FirstFailure = $Service.Properties.firstFailure #: REBOOT: REBOOT
|
||||
SecondFailure = $Service.Properties.secondFailure #: REBOOT: REBOOT
|
||||
ThirdFailure = $Service.Properties.thirdFailure #: REBOOT: REBOOT
|
||||
ResetFailCountDelay = $Service.Properties.resetFailCountDelay #: 0: 0
|
||||
RestartComputerDelay = $Service.Properties.restartComputerDelay #: 60000: 60000
|
||||
Filter = $Service.Filter
|
||||
AccountName = $Service.Properties.accountName
|
||||
AllowServiceToInteractWithTheDesktop = if ($Service.Properties.interact -eq 1) { 'Yes' } elseif ($Service.Properties.interact -eq 0) { 'No' } else { $null }
|
||||
RunThisProgram = $Service.Properties.program
|
||||
CommandLineParameters = $Service.Properties.args
|
||||
AppendFailCountToEndOfCommandLine = if ($Service.Properties.append -eq 1) { 'Yes' } elseif ($Service.Properties.append -eq 0) { 'No' } else { $null }
|
||||
<#$
|
||||
|
||||
startupType : NOCHANGE
|
||||
serviceName : AudioEndpointBuilder
|
||||
timeout : 30
|
||||
accountName : LocalSystem
|
||||
interact : 1
|
||||
thirdFailure : RUNCMD
|
||||
resetFailCountDelay : 0
|
||||
program : fgdfg
|
||||
args : dg
|
||||
append : 1
|
||||
|
||||
Service name AudioEndpointBuilder
|
||||
Action No change
|
||||
Startup type: No change
|
||||
Wait timeout if service is locked: 30 seconds
|
||||
Service AccountLog on service as: LocalSystem
|
||||
Allow service to interact with the desktop: Yes
|
||||
|
||||
First failure: No change
|
||||
Second failure: No change
|
||||
Subsequent failures: Run a program
|
||||
Reset fail count after: 0 days
|
||||
Run this program: fgdfg
|
||||
Command line parameters: dg
|
||||
Append fail count to end of command line: Yes
|
||||
|
||||
#>
|
||||
}
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,243 @@
|
||||
function ConvertTo-XMLTaskScheduler {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[PSCustomObject] $GPO,
|
||||
[switch] $SingleObject
|
||||
)
|
||||
if ($SingleObject) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Count = 0
|
||||
Settings = $null
|
||||
}
|
||||
[Array] $CreateGPO['Settings'] = foreach ($Entry in $GPO.DataSet.Drive) {
|
||||
[PSCustomObject] @{
|
||||
Changed = [DateTime] $Entry.changed
|
||||
#uid = $Entry.uid
|
||||
GPOSettingOrder = $Entry.GPOSettingOrder
|
||||
Filter = $Entry.Filter
|
||||
|
||||
Name = $Entry.Name
|
||||
Action = $Script:Actions["$($Entry.Properties.action)"]
|
||||
ThisDrive = $Entry.Properties.thisDrive
|
||||
AllDrives = $Entry.Properties.allDrives
|
||||
UserName = $Entry.Properties.userName
|
||||
Path = $Entry.Properties.path
|
||||
Label = $Entry.Properties.label
|
||||
Persistent = if ($Entry.Properties.persistent -eq '1') { $true } elseif ($Entry.Properties.persistent -eq '0') { $false } else { $Entry.Properties.persistent };
|
||||
UseLetter = if ($Entry.Properties.useLetter -eq '1') { $true } elseif ($Entry.Properties.useLetter -eq '0') { $false } else { $Entry.Properties.useLetter };
|
||||
Letter = $Entry.Properties.letter
|
||||
}
|
||||
}
|
||||
$CreateGPO['Count'] = $CreateGPO['Settings'].Count
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
} else {
|
||||
foreach ($Type in @('TaskV2', 'Task', 'ImmediateTaskV2', 'ImmediateTask')) {
|
||||
foreach ($Entry in $GPO.DataSet.$Type) {
|
||||
$ListActions = foreach ($LoopAction in $Entry.Properties.Task.Actions) {
|
||||
|
||||
foreach ($InternalAction in $LoopAction.Exec) {
|
||||
$Action = [ordered] @{
|
||||
ActionType = 'Execute'
|
||||
Command = $InternalAction.Command # : cmd
|
||||
Arguments = $InternalAction.Arguments # : / c wevtutil qe security / rd:true / f:text / c:1 / q:"*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and (EventID=4727 or EventID=4759 or EventID=4754 or EventID=4731)]]" >group-creation.txt
|
||||
WorkingDirectory = $InternalAction.WorkingDirectory# : % windir % \temp
|
||||
Server = $Null
|
||||
Subject = $Null
|
||||
To = $Null
|
||||
From = $Null
|
||||
Body = $Null
|
||||
Attachments = $Null
|
||||
}
|
||||
$Action
|
||||
}
|
||||
foreach ($InternalAction in $LoopAction.SendEmail) {
|
||||
$Action = [ordered] @{
|
||||
ActionType = 'SendEmail'
|
||||
Command = $null
|
||||
Arguments = $null # : / c wevtutil qe security / rd:true / f:text / c:1 / q:"*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and (EventID=4727 or EventID=4759 or EventID=4754 or EventID=4731)]]" >group-creation.txt
|
||||
WorkingDirectory = $null # : % windir % \temp
|
||||
Server = $InternalAction.Server # : smtp-de
|
||||
Subject = $InternalAction.Subject # : AD Group creation
|
||||
To = $InternalAction.To # : gm6b@eurofins.de,RalphThomasAussem@eurofins.de,karlthomaseggert@eurofins.de
|
||||
From = $InternalAction.From # : %computername%@eurofins.local
|
||||
Body = $InternalAction.Body # : A new security group has been created. Check attachment for further details.
|
||||
Attachments = $InternalAction.Attachments.File -join '; ' # : Attachments
|
||||
}
|
||||
$Action
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
<#
|
||||
[DBG]: PS C:\Support\GitHub\GpoZaurr> $Entry.Properties.Task.Triggers.EventTrigger
|
||||
|
||||
Enabled Subscription
|
||||
------- ------------
|
||||
true <QueryList><Query Id="0" Path="Security"><Select Path="Security">*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and EventID=4727]]</Select></Query></QueryList>
|
||||
true <QueryList><Query Id="0" Path="Security"><Select Path="Security">*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and EventID=4731]]</Select></Query></QueryList>
|
||||
true <QueryList><Query Id="0" Path="Security"><Select Path="Security">*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and EventID=4754]]</Select></Query></QueryList>
|
||||
false <QueryList><Query Id="0" Path="Security"><Select Path="Security">*[System[Provider[@Name='Microsoft-Windows-Security-Auditing'] and EventID=4759]]</Select></Query></QueryList>
|
||||
#>
|
||||
if ($ListActions.Count -eq 0) {
|
||||
$ListActions = @(
|
||||
|
||||
if ($Entry.Properties.appName) {
|
||||
# This supports Scheduled Task (legacy)
|
||||
$Action = [ordered] @{
|
||||
ActionType = $Script:Actions["$($Entry.Properties.action)"]
|
||||
Command = $Entry.Properties.appName
|
||||
Arguments = $Entry.Properties.args #
|
||||
WorkingDirectory = $Entry.Properties.startIn # : % windir % \temp
|
||||
Server = $null # : smtp-de
|
||||
Subject = $null # : AD Group creation
|
||||
To = $null
|
||||
From = $null
|
||||
Body = $null
|
||||
Attachments = $null
|
||||
}
|
||||
$Action
|
||||
} else {
|
||||
|
||||
$Action = [ordered] @{
|
||||
ActionType = $Script:Actions["$($Entry.Properties.action)"]
|
||||
Command = $null
|
||||
Arguments = $null #
|
||||
WorkingDirectory = $null # : % windir % \temp
|
||||
Server = $null # : smtp-de
|
||||
Subject = $null # : AD Group creation
|
||||
To = $null
|
||||
From = $null
|
||||
Body = $null
|
||||
Attachments = $null
|
||||
}
|
||||
$Action
|
||||
}
|
||||
)
|
||||
}
|
||||
foreach ($Action in $ListActions) {
|
||||
$CreateGPO = [ordered]@{
|
||||
DisplayName = $GPO.DisplayName
|
||||
DomainName = $GPO.DomainName
|
||||
GUID = $GPO.GUID
|
||||
GpoType = $GPO.GpoType
|
||||
#GpoCategory = $GPOEntry.GpoCategory
|
||||
#GpoSettings = $GPOEntry.GpoSettings
|
||||
Type = $Type
|
||||
Changed = [DateTime] $Entry.changed
|
||||
GPOSettingOrder = $Entry.GPOSettingOrder
|
||||
userContext = ''
|
||||
|
||||
Name = $Entry.Name
|
||||
Status = $Entry.status
|
||||
Action = $Script:Actions["$($Entry.Properties.action)"]
|
||||
|
||||
|
||||
runAs = $Entry.Properties.runAs #: NT AUTHORITY\System
|
||||
#logonType = $Entry.Properties.logonType #: InteractiveToken
|
||||
#Task = $Entry.Properties.Task #: Task
|
||||
|
||||
Comment = $Entry.Properties.comment
|
||||
}
|
||||
if ($Entry.Properties.startOnlyIfIdle) {
|
||||
# Old legacy task
|
||||
$Middle = [ordered] @{
|
||||
AllowStartOnDemand = $null #: true
|
||||
DisallowStartIfOnBatteries = $Entry.Properties.noStartIfOnBatteries #: false
|
||||
StopIfGoingOnBatteries = $Entry.Properties.stopIfGoingOnBatteries #: false
|
||||
AllowHardTerminate = $null #: true
|
||||
Enabled = $Entry.Properties.enabled #: true
|
||||
Hidden = $null #: false
|
||||
MultipleInstancesPolicy = $null #: IgnoreNew
|
||||
Priority = $null #: 7
|
||||
ExecutionTimeLimit = $null #: PT1H
|
||||
#IdleSettings = $Entry.Properties.Task.Settings.IdleSettings #: IdleSettings
|
||||
|
||||
IdleDuration = $Entry.Properties.deadlineMinutes # : PT5M
|
||||
IdleWaitTimeout = $null # : PT1H
|
||||
IdleStopOnIdleEnd = $Entry.Properties.stopOnIdleEnd # : false
|
||||
IdleRestartOnIdle = $Entry.Properties.startOnlyIfIdle # : false
|
||||
|
||||
RegistrationInfoAuthor = $null
|
||||
RegistrationInfoDescription = $null
|
||||
deleteWhenDone = $Entry.Properties.deleteWhenDone
|
||||
|
||||
<#
|
||||
action : U
|
||||
name : Task Name
|
||||
appName : Run command
|
||||
args : args for command
|
||||
startIn : start me in
|
||||
comment : Oops i did it again
|
||||
enabled : 1
|
||||
deleteWhenDone : 1
|
||||
maxRunTime : 259200000
|
||||
startOnlyIfIdle : 1
|
||||
idleMinutes : 10
|
||||
deadlineMinutes : 60
|
||||
stopOnIdleEnd : 1
|
||||
noStartIfOnBatteries : 1
|
||||
stopIfGoingOnBatteries : 1
|
||||
systemRequired : 0
|
||||
Triggers : Triggers
|
||||
#>
|
||||
}
|
||||
} else {
|
||||
$Middle = [ordered] @{
|
||||
AllowStartOnDemand = $Entry.Properties.Task.Settings.AllowStartOnDemand #: true
|
||||
DisallowStartIfOnBatteries = $Entry.Properties.Task.Settings.DisallowStartIfOnBatteries #: false
|
||||
StopIfGoingOnBatteries = $Entry.Properties.Task.Settings.StopIfGoingOnBatteries #: false
|
||||
AllowHardTerminate = $Entry.Properties.Task.Settings.AllowHardTerminate #: true
|
||||
Enabled = $Entry.Properties.Task.Settings.Enabled #: true
|
||||
Hidden = $Entry.Properties.Task.Settings.Hidden #: false
|
||||
MultipleInstancesPolicy = $Entry.Properties.Task.Settings.MultipleInstancesPolicy #: IgnoreNew
|
||||
Priority = $Entry.Properties.Task.Settings.Priority #: 7
|
||||
ExecutionTimeLimit = $Entry.Properties.Task.Settings.ExecutionTimeLimit #: PT1H
|
||||
#IdleSettings = $Entry.Properties.Task.Settings.IdleSettings #: IdleSettings
|
||||
|
||||
IdleDuration = $Entry.Properties.Task.Settings.IdleSettings.Duration # : PT5M
|
||||
IdleWaitTimeout = $Entry.Properties.Task.Settings.IdleSettings.WaitTimeout # : PT1H
|
||||
IdleStopOnIdleEnd = $Entry.Properties.Task.Settings.IdleSettings.StopOnIdleEnd # : false
|
||||
IdleRestartOnIdle = $Entry.Properties.Task.Settings.IdleSettings.RestartOnIdle # : false
|
||||
|
||||
RegistrationInfoAuthor = $Entry.Properties.Task.RegistrationInfo.Author
|
||||
RegistrationInfoDescription = $Entry.Properties.Task.RegistrationInfo.Description
|
||||
|
||||
deleteWhenDone = $Entry.Properties.deleteWhenDone
|
||||
}
|
||||
}
|
||||
$End = [ordered] @{
|
||||
id = $Entry.Properties.Principals.Principal.id # : Author
|
||||
UserId = $Entry.Properties.Principals.Principal.UserId # : NT AUTHORITY\System
|
||||
LogonType = $Entry.Properties.Principals.Principal.LogonType # : InteractiveToken
|
||||
RunLevel = $Entry.Properties.Principals.Principal.RunLevel # : HighestAvailable
|
||||
|
||||
#Persistent = if ($Entry.Properties.persistent -eq '1') { $true } elseif ($Entry.Properties.persistent -eq '0') { $false } else { $Entry.Properties.persistent };
|
||||
#UseLetter = if ($Entry.Properties.useLetter -eq '1') { $true } elseif ($Entry.Properties.useLetter -eq '0') { $false } else { $Entry.Properties.useLetter };
|
||||
#Letter = $Entry.Properties.letter
|
||||
}
|
||||
$CreateGPO = $CreateGPO + $Middle + $End + $Action
|
||||
$Last = [ordered] @{
|
||||
#Uid = $Group.uid #: {8F435B0A-CD15-464E-85F3-B6A55B9E816A}: {8F435B0A-CD15-464E-85F3-B6A55B9E816A}
|
||||
RunInLoggedOnUserSecurityContext = if ($Entry.userContext -eq '1') { 'Enabled' } elseif ($Entry.userContext -eq '0') { 'Disabled' } else { $Entry.userContext };
|
||||
RemoveThisItemWhenItIsNoLongerApplied = if ($Entry.removePolicy -eq '1') { 'Enabled' } elseif ($Entry.removePolicy -eq '0') { 'Disabled' } else { $Entry.removePolicy };
|
||||
Filters = $Group.Filters #::
|
||||
}
|
||||
$CreateGPO = $CreateGPO + $Last
|
||||
$CreateGPO['Linked'] = $GPO.Linked
|
||||
$CreateGPO['LinksCount'] = $GPO.LinksCount
|
||||
$CreateGPO['Links'] = $GPO.Links
|
||||
[PSCustomObject] $CreateGPO
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
function Format-CamelCaseToDisplayName {
|
||||
[cmdletBinding()]
|
||||
param(
|
||||
[string[]] $Text,
|
||||
[string] $AddChar
|
||||
)
|
||||
foreach ($string in $Text) {
|
||||
$newString = ''
|
||||
$stringChars = $string.GetEnumerator()
|
||||
$charIndex = 0
|
||||
foreach ($char in $stringChars) {
|
||||
# If upper and not first character, add a space
|
||||
if ([char]::IsUpper($char) -eq 'True' -and $charIndex -gt 0) {
|
||||
$newString = $newString + $AddChar + $char.ToString()
|
||||
} elseif ($charIndex -eq 0) {
|
||||
# If the first character, make it a capital always
|
||||
$newString = $newString + $char.ToString().ToUpper()
|
||||
} else {
|
||||
$newString = $newString + $char.ToString()
|
||||
}
|
||||
$charIndex++
|
||||
}
|
||||
$newString
|
||||
}
|
||||
}
|
||||
|
||||
#Format-CamelCaseToDisplayName -Text 'Test1', 'TestingMyAss', 'OtherTest', 'otherTEst'
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user