Additional Script Updates
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
##Enter the path to the registry key
|
||||
$regpath = "HKCU:\Software\Policies\Microsoft\Windows\WindowsAI"
|
||||
##Enter the name of the registry key
|
||||
$regname = "DisableAIDataAnalysis"
|
||||
##Enter the value of the registry key
|
||||
$regvalue = "1"
|
||||
|
||||
Try {
|
||||
$Registry = Get-ItemProperty -Path $regpath -Name $regname -ErrorAction Stop | Select-Object -ExpandProperty $regname
|
||||
If ($Registry -eq $regvalue){
|
||||
Write-Output "Compliant"
|
||||
Exit 0
|
||||
}
|
||||
Write-Warning "Not Compliant"
|
||||
Exit 1
|
||||
}
|
||||
Catch {
|
||||
Write-Output "RegKey Not Found, Compliant"
|
||||
Exit 0
|
||||
}
|
||||
@@ -0,0 +1,20 @@
|
||||
##Enter the path to the registry key
|
||||
$regpath = "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WindowsAI"
|
||||
##Enter the name of the registry key
|
||||
$regname = "DisableAIDataAnalysis"
|
||||
##Enter the value of the registry key
|
||||
$regvalue = "1"
|
||||
|
||||
Try {
|
||||
$Registry = Get-ItemProperty -Path $regpath -Name $regname -ErrorAction Stop | Select-Object -ExpandProperty $regname
|
||||
If ($Registry -eq $regvalue){
|
||||
Write-Output "Compliant"
|
||||
Exit 0
|
||||
}
|
||||
Write-Warning "Not Compliant"
|
||||
Exit 1
|
||||
}
|
||||
Catch {
|
||||
Write-Output "RegKey Not Found, Compliant"
|
||||
Exit 0
|
||||
}
|
||||
@@ -0,0 +1,10 @@
|
||||
##Enter the path to the registry key
|
||||
$regpath = "HKCU:\Software\Policies\Microsoft\Windows\WindowsAI"
|
||||
##Enter the name of the registry key
|
||||
$regname = "DisableAIDataAnalysis"
|
||||
##Enter the value of the registry key
|
||||
$regvalue = "1"
|
||||
##Enter the type of the registry key
|
||||
$regtype = "DWord"
|
||||
|
||||
New-ItemProperty -Path $regpath -Name $regname -Value $regvalue -PropertyType $regtype -Force
|
||||
@@ -0,0 +1,10 @@
|
||||
##Enter the path to the registry key
|
||||
$regpath = "HKLM:\SOFTWARE\Microsoft\PolicyManager\default\WindowsAI"
|
||||
##Enter the name of the registry key
|
||||
$regname = "DisableAIDataAnalysis"
|
||||
##Enter the value of the registry key
|
||||
$regvalue = "1"
|
||||
##Enter the type of the registry key
|
||||
$regtype = "DWord"
|
||||
|
||||
New-ItemProperty -Path $regpath -Name $regname -Value $regvalue -PropertyType $regtype -Force
|
||||
Reference in New Issue
Block a user