Windows 10/Deployment Batch: Difference between revisions

From Wiki
(Die Seite wurde neu angelegt: „* Disable Cortana <pre> $path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search" IF(!(Test-Path -Path $path)) { New-Item -Path "HKLM:\SOF…“)
 
No edit summary
Line 1: Line 1:
* disable/enable powershell restrictions
<pre>
set-executionpolicy unrestricted
set-executionpolicy restricted
</pre>
* Disable Cortana  
* Disable Cortana  
<pre>
<pre>
Line 5: Line 12:
     New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows" -Name "Windows Search"  
     New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows" -Name "Windows Search"  
}   
}   
Set-ItemProperty -Path $path -Name "AllowCortana" -Value 1  
Set-ItemProperty -Path $path -Name "AllowCortana" -Value 0  
#Restart Explorer to change it immediately     
#Restart Explorer to change it immediately     
Stop-Process -name explorer
Stop-Process -name explorer
</pre>
</pre>

Revision as of 21:58, 16 November 2018

  • disable/enable powershell restrictions
set-executionpolicy unrestricted
set-executionpolicy restricted


  • Disable Cortana
$path = "HKLM:\SOFTWARE\Policies\Microsoft\Windows\Windows Search"     
IF(!(Test-Path -Path $path)) {  
    New-Item -Path "HKLM:\SOFTWARE\Policies\Microsoft\Windows" -Name "Windows Search" 
}  
Set-ItemProperty -Path $path -Name "AllowCortana" -Value 0  
#Restart Explorer to change it immediately     
Stop-Process -name explorer