@ -550,25 +550,26 @@ public static string GetString(uint strId)
# https://docs.microsoft.com/en-us/graph/api/resources/intune-devices-windowsdefenderproductstatus?view=graph-rest-beta
if ( ( Get-ItemPropertyValue -Path " HKLM:\SOFTWARE\Microsoft\Windows nt\CurrentVersion " -Name EditionID ) -ne " EnterpriseG " )
{
try
# Due to "Set-StrictMode -Version Latest" we have to call Get-Member first to check whether ProductStatus property exists
if ( Get-CimInstance -ClassName MSFT_MpComputerStatus -Namespace root / Microsoft / Windows / Defender | Get-Member | Where-Object -FilterScript { $_ . Name -eq " ProductStatus " } )
{
if ( $Script:DefenderproductState )
{
if ( ( Get-CimInstance -ClassName MSFT_MpComputerStatus -Namespace root / Microsoft / Windows / Defender ) . ProductStatus -eq 1 )
{
$Script:DefenderProductStatus = $false
$Script:DefenderProductState = $false
}
else
{
$Script:DefenderProductStatus = $true
$Script:DefenderProductState = $true
}
}
else
{
$Script:DefenderProductStatus = $false
$Script:DefenderProductState = $false
}
}
catch [System.Management.Automation.PropertyNotFoundException]
else
{
Write-Warning -Message $Localization . UpdateDefender
@ -592,7 +593,7 @@ public static string GetString(uint strId)
}
else
{
$Script:DefenderProductStatus = $false
$Script:DefenderProductState = $false
}
# https://docs.microsoft.com/en-us/graph/api/resources/intune-devices-windowsdefenderproductstatus?view=graph-rest-beta
@ -1268,6 +1269,16 @@ function DiagnosticDataLevel
$Default
)
if ( -not ( Test-Path -Path HKLM : \ SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection ) )
{
New-Item -Path HKLM : \ SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection -Force
}
if ( -not ( Test-Path -Path HKCU : \ Software \ Microsoft \ Windows \ CurrentVersion \ Diagnostics \ DiagTrack ) )
{
New-Item -Path HKCU : \ Software \ Microsoft \ Windows \ CurrentVersion \ Diagnostics \ DiagTrack -Force
}
switch ( $PSCmdlet . ParameterSetName )
{
" Minimal "
@ -1275,43 +1286,29 @@ function DiagnosticDataLevel
if ( Get-WindowsEdition -Online | Where-Object -FilterScript { ( $_ . Edition -like " Enterprise* " ) -or ( $_ . Edition -eq " Education " ) } )
{
# Security level
if ( -not ( Test-Path -Path HKLM : \ SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection ) )
{
New-Item -Path HKLM : \ SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection -Force
}
New-ItemProperty -Path HKLM : \ SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection -Name AllowTelemetry -PropertyType DWord -Value 0 -Force
Set-Policy -Scope Computer -Path SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection -Name AllowTelemetry -Type DWORD -Value 0
}
else
{
# Required diagnostic data
if ( -not ( Test-Path -Path HKLM : \ SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection ) )
{
New-Item -Path HKLM : \ SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection -Force
}
New-ItemProperty -Path HKLM : \ SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection -Name AllowTelemetry -PropertyType DWord -Value 1 -Force
Set-Policy -Scope Computer -Path SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection -Name AllowTelemetry -Type DWORD -Value 1
}
if ( -not ( Test-Path -Path HKCU : \ Software \ Microsoft \ Windows \ CurrentVersion \ Diagnostics \ DiagTrack ) )
{
New-Item -Path HKCU : \ Software \ Microsoft \ Windows \ CurrentVersion \ Diagnostics \ DiagTrack -Force
}
New-ItemProperty -Path HKLM : \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Policies \ DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 1 -Force
New-ItemProperty -Path HKCU : \ Software \ Microsoft \ Windows \ CurrentVersion \ Diagnostics \ DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 1 -Force
}
" Default "
{
# Optional diagnostic data
Remove-ItemProperty -Path HKLM : \ SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore
Set-Policy -Scope Computer -Path SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection -Name AllowTelemetry -Type CLEAR
if ( -not ( Test-Path -Path HKCU : \ Software \ Microsoft \ Windows \ CurrentVersion \ Diagnostics \ DiagTrack ) )
{
New-Item -Path HKCU : \ Software \ Microsoft \ Windows \ CurrentVersion \ Diagnostics \ DiagTrack -Force
}
New-ItemProperty -Path HKLM : \ SOFTWARE \ Microsoft \ Windows \ CurrentVersion \ Policies \ DataCollection -Name MaxTelemetryAllowed -PropertyType DWord -Value 3 -Force
New-ItemProperty -Path HKCU : \ Software \ Microsoft \ Windows \ CurrentVersion \ Diagnostics \ DiagTrack -Name ShowedToastAtLevel -PropertyType DWord -Value 3 -Force
Remove-ItemProperty -Path HKLM : \ SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection -Name AllowTelemetry -Force -ErrorAction Ignore
Set-Policy -Scope Computer -Path SOFTWARE \ Policies \ Microsoft \ Windows \ DataCollection -Name AllowTelemetry -Type CLEAR
}
}
}
@ -2900,55 +2897,439 @@ function RecycleBinDeleteConfirmation
<#
. SYNOPSIS
The " 3D Objects " folder in " This PC " and Quick access
. PARAMETER Hide
Hide the " 3D Objects " folder in " This PC " and Quick access
User folders in " This PC "
. PARAMETER Show
Show the " 3D Objects " folder in " This PC " and Quick access
Show user folders in " This PC "
. PARAMETER Hide
Hide user folders in " This PC "
. EXAMPLE
3DObjects -Hide
UserFolders -ThreeDObjects Show -Desktop Show -Documents Show -Downloads Show -Music Show -Pictures Show -Videos Show
. EXAMPLE
3DObjects -Show
UserFolders -ThreeDObjects Hide -Desktop Hide -Documents Hide -Downloads Hide -Music Hide -Pictures Hide -Videos Hide
. NOTES
Current user
Machine-wide
#>
function 3DObject s
function UserFolder s
{
[ CmdletBinding ( ) ]
param
(
[ Parameter (
Mandatory = $true ,
ParameterSetName = " Hide "
) ]
[switch]
$Hide ,
[ Parameter ( Mandatory = $false ) ]
[ ValidateSet ( " Hide " , " Show " ) ]
[string]
$ThreeDObjects ,
[ Parameter (
Mandatory = $true ,
ParameterSetName = " Show "
) ]
[switch]
$Show
[ Parameter ( Mandatory = $false ) ]
[ ValidateSet ( " Hide " , " Show " ) ]
[string]
$Desktop ,
[ Parameter ( Mandatory = $false ) ]
[ ValidateSet ( " Hide " , " Show " ) ]
[string]
$Documents ,
[ Parameter ( Mandatory = $false ) ]
[ ValidateSet ( " Hide " , " Show " ) ]
[string]
$Downloads ,
[ Parameter ( Mandatory = $false ) ]
[ ValidateSet ( " Hide " , " Show " ) ]
[string]
$Music ,
[ Parameter ( Mandatory = $false ) ]
[ ValidateSet ( " Hide " , " Show " ) ]
[string]
$Pictures ,
[ Parameter ( Mandatory = $false ) ]
[ ValidateSet ( " Hide " , " Show " ) ]
[string]
$Videos
)
switch ( $PSCmdlet . ParameterSetName )
switch ( $MyInvocation . BoundParameters . Keys )
{
" ThreeDObjects "
{
switch ( $ThreeDObjects )
{
" Hide "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag " -Force
}
New-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
New-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
}
" Show "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0DB7E03F-FC29-4DC6-9020-FF41B59E513A} " -Force
}
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{31C0DD25-9439-4F12-BF41-7FF4EDA38722}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
}
}
}
" Desktop "
{
switch ( $Desktop )
{
" Hide "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag " -Force
}
New-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
New-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
}
" Show "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641} " -Force
}
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{B4BFCC3A-DB2C-424C-B029-7FE99A87C641}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
}
}
}
" Documents "
{
switch ( $Desktop )
{
" Hide "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{d3162b92-9365-467a-956b-92703aca08af} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{d3162b92-9365-467a-956b-92703aca08af} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag " -Force
}
New-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
New-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
}
" Show "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A8CDFF1C-4878-43be-B5FD-F8091C1C60D0} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{d3162b92-9365-467a-956b-92703aca08af} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{d3162b92-9365-467a-956b-92703aca08af} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{d3162b92-9365-467a-956b-92703aca08af} " -Force
}
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f42ee2d3-909f-4907-8871-4c22fc0bf756}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
}
}
}
" Downloads "
{
switch ( $Desktop )
{
" Hide "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{374DE290-123F-4565-9164-39C4925E467B} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{374DE290-123F-4565-9164-39C4925E467B} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{088e3905-0323-4b02-9826-5d99428e115f} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{088e3905-0323-4b02-9826-5d99428e115f} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag " -Force
}
New-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
New-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
}
" Show "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{374DE290-123F-4565-9164-39C4925E467B} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{374DE290-123F-4565-9164-39C4925E467B} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{374DE290-123F-4565-9164-39C4925E467B} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{088e3905-0323-4b02-9826-5d99428e115f} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{088e3905-0323-4b02-9826-5d99428e115f} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{088e3905-0323-4b02-9826-5d99428e115f} " -Force
}
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
}
}
}
" Music "
{
switch ( $Desktop )
{
" Hide "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{1CF1260C-4DD0-4ebb-811F-33C572699FDE} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{1CF1260C-4DD0-4ebb-811F-33C572699FDE} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag " -Force
}
New-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
New-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
}
" Show "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{1CF1260C-4DD0-4ebb-811F-33C572699FDE} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{1CF1260C-4DD0-4ebb-811F-33C572699FDE} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{1CF1260C-4DD0-4ebb-811F-33C572699FDE} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{3dfdf296-dbec-4fb4-81d1-6a3438bcf4de} " -Force
}
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{a0c69a99-21c8-4671-8703-7934162fcf1d}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
}
}
}
" Pictures "
{
switch ( $Desktop )
{
" Hide "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{24ad3ad4-a569-4530-98e1-ab02f9417aa8} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{24ad3ad4-a569-4530-98e1-ab02f9417aa8} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag " -Force
}
New-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
New-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{0ddd015d-b06c-45d5-8c4c-f59713854639}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
}
" Show "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{3ADD1653-EB32-4cb0-BBD7-DFA0ABB5ACCA} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{24ad3ad4-a569-4530-98e1-ab02f9417aa8} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{24ad3ad4-a569-4530-98e1-ab02f9417aa8} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{24ad3ad4-a569-4530-98e1-ab02f9417aa8} " -Force
}
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{7d83ee9b-2244-4e70-b1f5-5393042af1e4}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
}
}
}
" Videos "
{
switch ( $Desktop )
{
" Hide "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A0953C92-50DC-43bf-BE83-3742FED03C9C} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A0953C92-50DC-43bf-BE83-3742FED03C9C} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag " -Force
}
New-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
New-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag " -Name ThisPCPolicy -PropertyType String -Value Hide -Force
}
" Show "
{
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{A0953C92-50DC-43bf-BE83-3742FED03C9C} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A0953C92-50DC-43bf-BE83-3742FED03C9C} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{A0953C92-50DC-43bf-BE83-3742FED03C9C} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\MyComputer\NameSpace\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a} " -Force
}
if ( -not ( Test-Path -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a} " ) )
{
New-Item -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{f86fa3ab-70d2-4fc7-9c99-fcbf05467f3a} " -Force
}
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
Remove-ItemProperty -Path " HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Explorer\FolderDescriptions\{35286a68-3c57-41a1-bbb1-0eae73d76c95}\PropertyBag " -Name ThisPCPolicy -Force -ErrorAction Ignore
}
}
}
}
}
@ -9816,7 +10197,8 @@ function Export-Associations
Clear-Variable -Name ProgramPath , Icon -ErrorAction Ignore
$AllJSON | ConvertTo-Json | Set-Content -Path " $ PSScriptRoot\..\Application_Associations.json " -Force -Encoding utf8
# Save in UTF-8 without BOM
$AllJSON | ConvertTo-Json | Set-Content -Path " $ PSScriptRoot\..\Application_Associations.json " -Encoding utf8NoBOM -Force
Remove-Item -Path " $ env:TEMP\Application_Associations.xml " -Force
}
@ -10384,7 +10766,7 @@ function SATADrivesRemovableMedia
. NOTES
Machine-wide
#>
function Install-WSL ###
function Install-WSL
{
[System.Console] :: OutputEncoding = [System.Text.Encoding] :: Unicode
@ -13212,6 +13594,9 @@ while ([WinAPI.Focus]::GetFocusAssistState() -ne "OFF")
# Run the task
Get-ChildItem -Path `$ env : TEMP -Recurse -Force | Where-Object -FilterScript { `$ _ . CreationTime -lt ( Get-Date ) . AddDays ( - 1 ) } | Remove-Item -Recurse -Force
# This the only way to get "C:\$WinREAgent" path because we need to open brackets for $env:SystemDrive but not for $WinREAgent
Remove-Item -Path ( -join ( " `$ env:SystemDrive\ " , '$WinREAgent' ) ) -Recurse -Force
[ Windows . UI . Notifications . ToastNotificationManager , Windows . UI . Notifications , ContentType = WindowsRuntime ] | Out-Null
[ Windows . Data . Xml . Dom . XmlDocument , Windows . Data . Xml . Dom . XmlDocument , ContentType = WindowsRuntime ] | Out-Null
@ -13678,7 +14063,7 @@ function EventViewerCustomView
}
# Save ProcessCreation.xml in the UTF-8 without BOM encoding
Set-Content -Path " $ env:ProgramData\Microsoft\Event Viewer\Views\ProcessCreation.xml " -Value $XML -Encoding utf8 -NoNewline -Force
Set-Content -Path " $ env:ProgramData\Microsoft\Event Viewer\Views\ProcessCreation.xml " -Value $XML -Encoding utf8NoBOM -NoNewline -Force
}
" Disable "
{