diff --git a/Private/OldBeforeDelete/Get-XMLAccount.ps1 b/Private/OldBeforeDelete/Get-XMLAccount.ps1 deleted file mode 100644 index 769dcc0..0000000 --- a/Private/OldBeforeDelete/Get-XMLAccount.ps1 +++ /dev/null @@ -1,32 +0,0 @@ -function Get-XMLAccount { - [cmdletBinding()] - param( - [PSCustomObject] $GPO, - [System.Xml.XmlElement[]] $GPOOutput, - [string] $Splitter = [System.Environment]::NewLine, - [switch] $FullObjects - ) - $LinksInformation = Get-LinksFromXML -GPOOutput $GPOOutput -Splitter $Splitter -FullObjects:$FullObjects - foreach ($Type in @('User', 'Computer')) { - if ($GPOOutput.$Type.ExtensionData.Extension) { - foreach ($ExtensionType in $GPOOutput.$Type.ExtensionData.Extension) { - foreach ($Key in $ExtensionType.Account) { - [PSCustomObject] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - Linked = $LinksInformation.Linked - LinksCount = $LinksInformation.LinksCount - Links = $LinksInformation.Links - GpoType = $Type - Name = $Key.Name - Type = $Key.Type - SettingNumber = $Key.SettingNumber - SettingBoolean = if ($Key.SettingBoolean -eq 'true') { $true } elseif ($Key.SettingBoolean -eq 'false') { $false } else { $null } - } - } - } - } - } -} - diff --git a/Private/OldBeforeDelete/Get-XMLAutologon.ps1 b/Private/OldBeforeDelete/Get-XMLAutologon.ps1 deleted file mode 100644 index 8df4cfe..0000000 --- a/Private/OldBeforeDelete/Get-XMLAutologon.ps1 +++ /dev/null @@ -1,63 +0,0 @@ -function Get-XMLAutologon { - [cmdletBinding()] - param( - [PSCustomObject] $GPO, - [System.Xml.XmlElement[]] $GPOOutput, - [string] $Splitter = [System.Environment]::NewLine, - [switch] $FullObjects - ) - $LinksInformation = Get-LinksFromXML -GPOOutput $GPOOutput -Splitter $Splitter -FullObjects:$FullObjects - foreach ($Type in @('User', 'Computer')) { - if ($GPOOutput.$Type.ExtensionData.Extension) { - foreach ($ExtensionType in $GPOOutput.$Type.ExtensionData.Extension) { - if ($ExtensionType.RegistrySettings.Registry.Properties.Key -ne 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon') { - continue - } - $Autologon = [ordered] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - Linked = $LinksInformation.Linked - LinksCount = $LinksInformation.LinksCount - Links = $LinksInformation.Links - AutoAdminLogon = $null - DefaultDomainName = $null - DefaultUserName = $null - DefaultPassword = $null - } - foreach ($Key in $ExtensionType.RegistrySettings.Registry) { - if ($Key.Properties.key -eq 'SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon') { - <# - [PSCustomObject] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - Linked = $Linked - LinksCount = $LinksCount - GpoType = $Type - Changed = [DateTime] $Key.changed - GPOSettingOrder = $Key.GPOSettingOrder - hive = $Key.Properties.hive #: HKEY_LOCAL_MACHINE - key = $Key.Properties.key #: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon - name = $Key.Properties.name #: AutoAdminLogon - type = $Key.Properties.type #: REG_SZ - value = $Key.Properties.value # - Filters = $Key.Filters - } - #> - if ($Key.Properties.Name -eq 'AutoAdminLogon') { - $Autologon['AutoAdminLogon'] = [bool] $Key.Properties.value - } elseif ($Key.Properties.Name -eq 'DefaultDomainName') { - $Autologon['DefaultDomainName'] = $Key.Properties.value - } elseif ($Key.Properties.Name -eq 'DefaultUserName') { - $Autologon['DefaultUserName'] = $Key.Properties.value - } elseif ($Key.Properties.Name -eq 'DefaultPassword') { - $Autologon['DefaultPassword'] = $Key.Properties.value - } - } - } - [PSCustomObject] $Autologon - } - } - } -} \ No newline at end of file diff --git a/Private/OldBeforeDelete/Get-XMLLocalUserGroups.ps1 b/Private/OldBeforeDelete/Get-XMLLocalUserGroups.ps1 deleted file mode 100644 index 0fdee3c..0000000 --- a/Private/OldBeforeDelete/Get-XMLLocalUserGroups.ps1 +++ /dev/null @@ -1,93 +0,0 @@ -function Get-XMLLocalUserGroups { - [cmdletBinding()] - param( - [PSCustomObject] $GPO, - [System.Xml.XmlElement[]] $GPOOutput, - [string] $Splitter = [System.Environment]::NewLine, - [switch] $FullObjects - ) - $LinksInformation = Get-LinksFromXML -GPOOutput $GPOOutput -Splitter $Splitter -FullObjects:$FullObjects - foreach ($Type in @('User', 'Computer')) { - if ($GPOOutput.$Type.ExtensionData.Extension.LocalUsersAndGroups) { - foreach ($NestedType in @('User', 'Group')) { - if ($GPOOutput.$Type.ExtensionData.Extension.LocalUsersAndGroups.$NestedType) { - foreach ($Entry in $GPOOutput.$Type.ExtensionData.Extension.LocalUsersAndGroups.$NestedType) { - if ($Entry.Properties.Members) { - foreach ($Members in $Entry.Properties.Members) { - foreach ($Member in $Members.Member) { - [PSCustomObject] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - Linked = $LinksInformation.Linked - LinksCount = $LinksInformation.LinksCount - Links = $LinksInformation.Links - GpoType = $Type - Name = $Entry.name - Changed = [DateTime] $Entry.changed - GPOSettingOrder = $Entry.GPOSettingOrder - Filters = $Entry.Filters - ActionType = $NestedType - Action = $Entry.Properties.Action - UserName = $Entry.Properties.userName - NewName = $Entry.Properties.newName - Description = $Entry.Properties.description - DeleteAllUsers = [bool] $Entry.Properties.deleteAllUsers - DeleteAllGroups = [bool] $Entry.Properties.deleteAllGroups - RemoveAccounts = [bool] $Entry.Properties.removeAccounts - GroupSid = $Entry.Properties.groupSid - GroupName = $Entry.Properties.groupName - MembersName = $Member.Name - MembersAction = $Member.Action - MembersSid = $Member.Sid - FullName = $Entry.Properties.fullName - AccountCpassword = $Entry.Properties.cpassword - AccountChangeLogon = [bool] $Entry.Properties.changeLogon - AccountNoChange = [bool] $Entry.Properties.noChange - AccountNeverExpires = [bool] $Entry.Properties.neverExpires - AccountDisabled = [bool] $Entry.Properties.acctDisabled - SubAuthority = $Entry.Properties.subAuthority - } - } - } - } else { - [PSCustomObject] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - Linked = $LinksInformation.Linked - LinksCount = $LinksInformation.LinksCount - Links = $LinksInformation.Links - GpoType = $Type - Name = $Entry.name - Changed = [DateTime] $Entry.changed - GPOSettingOrder = $Entry.GPOSettingOrder - Filters = $Entry.Filters - ActionType = $NestedType - Action = $Entry.Properties.Action - UserName = $Entry.Properties.userName - NewName = $Entry.Properties.newName - Description = $Entry.Properties.description - DeleteAllUsers = [bool] $Entry.Properties.deleteAllUsers - DeleteAllGroups = [bool] $Entry.Properties.deleteAllGroups - RemoveAccounts = [bool] $Entry.Properties.removeAccounts - GroupSid = $Entry.Properties.groupSid - GroupName = $Entry.Properties.groupName - MembersName = $null - MembersAction = $null - MembersSid = $null - FullName = $Entry.Properties.fullName - AccountCpassword = $Entry.Properties.cpassword - AccountChangeLogon = [bool] $Entry.Properties.changeLogon - AccountNoChange = [bool] $Entry.Properties.noChange - AccountNeverExpires = [bool] $Entry.Properties.neverExpires - AccountDisabled = [bool] $Entry.Properties.acctDisabled - SubAuthority = $Entry.Properties.subAuthority - } - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Private/OldBeforeDelete/Get-XMLRegistryPolicies.ps1 b/Private/OldBeforeDelete/Get-XMLRegistryPolicies.ps1 deleted file mode 100644 index bee0387..0000000 --- a/Private/OldBeforeDelete/Get-XMLRegistryPolicies.ps1 +++ /dev/null @@ -1,41 +0,0 @@ -function Get-XMLRegistryPolicies { - [cmdletBinding()] - param( - [PSCustomObject] $GPO, - [System.Xml.XmlElement[]] $GPOOutput, - [string] $Splitter = [System.Environment]::NewLine, - [switch] $FullObjects - ) - $LinksInformation = Get-LinksFromXML -GPOOutput $GPOOutput -Splitter $Splitter -FullObjects:$FullObjects - foreach ($Type in @('User', 'Computer')) { - if ($GPOOutput.$Type.ExtensionData.Extension) { - foreach ($ExtensionType in $GPOOutput.$Type.ExtensionData.Extension) { - foreach ($Key in $ExtensionType.Policy) { - [PSCustomObject] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - Linked = $LinksInformation.Linked - LinksCount = $LinksInformation.LinksCount - Links = $LinksInformation.Links - GpoType = $Type - PolicyName = $Key.Name - PolicyState = $Key.State - PolicyCategory = $Key.Category - PolicySupported = $Key.Supported - PolicyExplain = $Key.Explain - PolicyCheckBox = $Key.CheckBox - PolicyText = $Key.Text - DropDownList = $Key.DropDownList - PolicyEditText = $Key.EditText - <# - Name State Value - ---- ----- ----- - Target group name for this computer Enabled de00_wsus3_measuring_devices - #> - } - } - } - } - } -} \ No newline at end of file diff --git a/Private/OldBeforeDelete/Get-XMLRegistrySettings.ps1 b/Private/OldBeforeDelete/Get-XMLRegistrySettings.ps1 deleted file mode 100644 index 58326fe..0000000 --- a/Private/OldBeforeDelete/Get-XMLRegistrySettings.ps1 +++ /dev/null @@ -1,35 +0,0 @@ -function Get-XMLRegistrySettings { - [cmdletBinding()] - param( - [PSCustomObject] $GPO, - [System.Xml.XmlElement[]] $GPOOutput, - [string] $Splitter = [System.Environment]::NewLine, - [switch] $FullObjects - ) - $LinksInformation = Get-LinksFromXML -GPOOutput $GPOOutput -Splitter $Splitter -FullObjects:$FullObjects - foreach ($Type in @('User', 'Computer')) { - if ($GPOOutput.$Type.ExtensionData.Extension) { - foreach ($ExtensionType in $GPOOutput.$Type.ExtensionData.Extension) { - foreach ($Key in $ExtensionType.RegistrySettings.Registry) { - [PSCustomObject] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - Linked = $LinksInformation.Linked - LinksCount = $LinksInformation.LinksCount - Links = $LinksInformation.Links - GpoType = $Type - Changed = [DateTime] $Key.changed - GPOSettingOrder = $Key.GPOSettingOrder - Hive = $Key.Properties.hive #: HKEY_LOCAL_MACHINE - Key = $Key.Properties.key #: SOFTWARE\Microsoft\Windows NT\CurrentVersion\Winlogon - Name = $Key.Properties.name #: AutoAdminLogon - Type = $Key.Properties.type #: REG_SZ - Value = $Key.Properties.value # - Filters = $Key.Filters - } - } - } - } - } -} \ No newline at end of file diff --git a/Private/OldBeforeDelete/Get-XMLScripts.ps1 b/Private/OldBeforeDelete/Get-XMLScripts.ps1 deleted file mode 100644 index 1c389b9..0000000 --- a/Private/OldBeforeDelete/Get-XMLScripts.ps1 +++ /dev/null @@ -1,49 +0,0 @@ -function Get-XMLScripts { - [cmdletBinding()] - param( - [PSCustomObject] $GPO, - [System.Xml.XmlElement[]] $GPOOutput, - [string] $Splitter = [System.Environment]::NewLine, - [switch] $FullObjects - ) - $LinksInformation = Get-LinksFromXML -GPOOutput $GPOOutput -Splitter $Splitter -FullObjects:$FullObjects - foreach ($Type in @('User', 'Computer')) { - if ($GPOOutput.$Type.ExtensionData.Extension) { - foreach ($ExtensionType in $GPOOutput.$Type.ExtensionData.Extension) { - foreach ($Key in $ExtensionType.Script) { - if ($FullObjects) { - [PSCustomObject] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - Linked = $LinksInformation.Linked - LinksCount = $LinksInformation.LinksCount - Links = $LinksInformation.Links - GpoType = $Type - Command = $Key.Command - Parameters = $Key.Parameters - Type = $Key.Type - Order = $Key.Order - RunOrder = $Key.RunOrder - } - } else { - [PSCustomObject] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - Linked = $LinksInformation.Linked - LinksCount = $LinksInformation.LinksCount - Links = $LinksInformation.Links - GpoType = $Type - Command = $Key.Command - Parameters = $Key.Parameters - type = $Key.Type - Order = $Key.Order - RunOrder = $Key.RunOrder - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Private/OldBeforeDelete/Get-XMLSecurityOptions.ps1 b/Private/OldBeforeDelete/Get-XMLSecurityOptions.ps1 deleted file mode 100644 index 483c99a..0000000 --- a/Private/OldBeforeDelete/Get-XMLSecurityOptions.ps1 +++ /dev/null @@ -1,29 +0,0 @@ -function Get-XMLSecurityOptions { - [cmdletBinding()] - param( - [PSCustomObject] $GPO, - [System.Xml.XmlElement[]] $GPOOutput, - [string] $Splitter = [System.Environment]::NewLine, - [switch] $FullObjects - ) - $LinksInformation = Get-LinksFromXML -GPOOutput $GPOOutput -Splitter $Splitter -FullObjects:$FullObjects - foreach ($Type in @('User', 'Computer')) { - if ($GPOOutput.$Type.ExtensionData.Extension) { - foreach ($ExtensionType in $GPOOutput.$Type.ExtensionData.Extension) { - foreach ($Key in $ExtensionType.SecurityOptions) { - [PSCustomObject] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - Linked = $LinksInformation.Linked - LinksCount = $LinksInformation.LinksCount - Links = $LinksInformation.Links - GpoType = $Type - SystemAccessPolicyName = $Key.SystemAccessPolicyName - SettingNumber = $Key.SettingNumber - } - } - } - } - } -} \ No newline at end of file diff --git a/Private/OldBeforeDelete/Get-XMLSoftwareInstallation.ps1 b/Private/OldBeforeDelete/Get-XMLSoftwareInstallation.ps1 deleted file mode 100644 index 5a466e5..0000000 --- a/Private/OldBeforeDelete/Get-XMLSoftwareInstallation.ps1 +++ /dev/null @@ -1,83 +0,0 @@ -function Get-XMLSoftwareInstallation { - [cmdletBinding()] - param( - [PSCustomObject] $GPO, - [System.Xml.XmlElement[]] $GPOOutput, - [string] $Splitter = [System.Environment]::NewLine, - [switch] $FullObjects - ) - $LinksInformation = Get-LinksFromXML -GPOOutput $GPOOutput -Splitter $Splitter -FullObjects:$FullObjects - foreach ($Type in @('User', 'Computer')) { - if ($GPOOutput.$Type.ExtensionData.Extension) { - foreach ($ExtensionType in $GPOOutput.$Type.ExtensionData.Extension) { - foreach ($Key in $ExtensionType.MsiApplication) { - if ($FullObjects) { - [PSCustomObject] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - Linked = $LinksInformation.Linked - LinksCount = $LinksInformation.LinksCount - Links = $LinksInformation.Links - GpoType = $Type - Identifier = $Key.Identifier #: { 10495e9e-79c1-4a32-b278-a24cd495437f } - Name = $Key.Name #: Local Administrator Password Solution (2) - Path = $Key.Path #: \\area1.local\SYSVOL\area1.local\Policies\ { 5F5042A0-008F-45E3-8657-79C87BD002E3 }\LAPS.x64.msi - MajorVersion = $Key.MajorVersion #: 6 - MinorVersion = $Key.MinorVersion #: 2 - LanguageId = $Key.LanguageId #: 1033 - Architecture = $Key.Architecture #: 9 - IgnoreLanguage = if ($Key.IgnoreLanguage -eq 'true') { $true } else { $false } #: false - Allowx86Onia64 = if ($Key.Allowx86Onia64 -eq 'true') { $true } else { $false } #: true - SupportURL = $Key.SupportURL #: - AutoInstall = if ($Key.AutoInstall -eq 'true') { $true } else { $false } #: true - DisplayInARP = if ($Key.DisplayInARP -eq 'true') { $true } else { $false } #: true - IncludeCOM = if ($Key.IncludeCOM -eq 'true') { $true } else { $false } #: true - SecurityDescriptor = $Key.SecurityDescriptor #: SecurityDescriptor - DeploymentType = $Key.DeploymentType #: Assign - ProductId = $Key.ProductId #: { ea8cb806-c109 - 4700 - 96b4-f1f268e5036c } - ScriptPath = $Key.ScriptPath #: \\area1.local\SysVol\area1.local\Policies\ { 5F5042A0-008F-45E3-8657-79C87BD002E3 }\Machine\Applications\ { EAC9B821-FB4D - 457A-806F-E5B528D1E41A }.aas - DeploymentCount = $Key.DeploymentCount #: 0 - InstallationUILevel = $Key.InstallationUILevel #: Maximum - Upgrades = if ($Key.Upgrades.Mandatory -eq 'true') { $true } else { $false } #: Upgrades - UninstallUnmanaged = if ($Key.UninstallUnmanaged -eq 'true') { $true } else { $false } #: false - LossOfScopeAction = $Key.LossOfScopeAction #: Unmanage - } - } else { - [PSCustomObject] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - Linked = $LinksInformation.Linked - LinksCount = $LinksInformation.LinksCount - Links = $LinksInformation.Links - GpoType = $Type - Identifier = $Key.Identifier #: { 10495e9e-79c1-4a32-b278-a24cd495437f } - Name = $Key.Name #: Local Administrator Password Solution (2) - Path = $Key.Path #: \\area1.local\SYSVOL\area1.local\Policies\ { 5F5042A0-008F-45E3-8657-79C87BD002E3 }\LAPS.x64.msi - MajorVersion = $Key.MajorVersion #: 6 - MinorVersion = $Key.MinorVersion #: 2 - LanguageId = $Key.LanguageId #: 1033 - Architecture = $Key.Architecture #: 9 - IgnoreLanguage = if ($Key.IgnoreLanguage -eq 'true') { $true } else { $false } #: false - Allowx86Onia64 = if ($Key.Allowx86Onia64 -eq 'true') { $true } else { $false } #: true - SupportURL = $Key.SupportURL #: - AutoInstall = if ($Key.AutoInstall -eq 'true') { $true } else { $false } #: true - DisplayInARP = if ($Key.DisplayInARP -eq 'true') { $true } else { $false } #: true - IncludeCOM = if ($Key.IncludeCOM -eq 'true') { $true } else { $false } #: true - SecurityDescriptor = $Key.SecurityDescriptor #: SecurityDescriptor - DeploymentType = $Key.DeploymentType #: Assign - ProductId = $Key.ProductId #: { ea8cb806-c109 - 4700 - 96b4-f1f268e5036c } - ScriptPath = $Key.ScriptPath #: \\area1.local\SysVol\area1.local\Policies\ { 5F5042A0-008F-45E3-8657-79C87BD002E3 }\Machine\Applications\ { EAC9B821-FB4D - 457A-806F-E5B528D1E41A }.aas - DeploymentCount = $Key.DeploymentCount #: 0 - InstallationUILevel = $Key.InstallationUILevel #: Maximum - Upgrades = if ($Key.Upgrades.Mandatory -eq 'true') { $true } else { $false } #: Upgrades - UninstallUnmanaged = if ($Key.UninstallUnmanaged -eq 'true') { $true } else { $false } #: false - LossOfScopeAction = $Key.LossOfScopeAction #: Unmanage - } - } - } - } - } - } -} \ No newline at end of file diff --git a/Private/OldBeforeDelete/Get-XMLSystemServices.ps1 b/Private/OldBeforeDelete/Get-XMLSystemServices.ps1 deleted file mode 100644 index 071a7bd..0000000 --- a/Private/OldBeforeDelete/Get-XMLSystemServices.ps1 +++ /dev/null @@ -1,30 +0,0 @@ -function Get-XMLSystemServices { - [cmdletBinding()] - param( - [PSCustomObject] $GPO, - [System.Xml.XmlElement[]] $GPOOutput, - [string] $Splitter = [System.Environment]::NewLine, - [switch] $FullObjects - ) - $LinksInformation = Get-LinksFromXML -GPOOutput $GPOOutput -Splitter $Splitter -FullObjects:$FullObjects - foreach ($Type in @('User', 'Computer')) { - if ($GPOOutput.$Type.ExtensionData.Extension) { - foreach ($ExtensionType in $GPOOutput.$Type.ExtensionData.Extension) { - foreach ($Key in $ExtensionType.SystemServices) { - [PSCustomObject] @{ - DisplayName = $GPO.DisplayName - DomainName = $GPO.DomainName - GUID = $GPO.Guid - Linked = $LinksInformation.Linked - LinksCount = $LinksInformation.LinksCount - Links = $LinksInformation.Links - GpoType = $Type - Name = $Key.Name - StartupMode = $Key.StartupMode - - } - } - } - } - } -} \ No newline at end of file