PCFixAll.com

Scripting

Disable Cortana

The following PowerShell script can be used to disable Cortana in Windows 10. The “AllowCortana” -Value can be changed to 1 to re-enable Cortana. In order for this to run you must run Power Shell as an Administrator and you …

  Show More

The following PowerShell script can be used to disable Cortana in Windows 10. The “AllowCortana” -Value can be changed to 1 to re-enable Cortana.

In order for this to run you must run Power Shell as an Administrator and you will want to bypass the default “Restricted” execution policy for scripts in Power Shell using the following command. This does not make any configuration changes as the “Unrestricted” option is only for the session, once it is closed the “Restricted” execution policy is still in place.

Set-ExecutionPolicy Unrestricted -Scope Process

With the execution policy items out of the way you can run the Power Shell ISE and an Administrator and then copy and paste the code below into the editor and then run it.

$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
  Posted by Admin on November 24, 2017  /  Tags:

Office 365 User and License Report

The following will generate a report of all licensed users in Office 365. You will have to connect to Office 365 PowerShell environment prior to being able to run this script to generate your report. Get-MSOLUser -All | select userprincipalname,islicensed,{$_.Licenses.AccountSkuId} | Export-CSV …

  Show More

The following will generate a report of all licensed users in Office 365. You will have to connect to Office 365 PowerShell environment prior to being able to run this script to generate your report.

Get-MSOLUser -All | select userprincipalname,islicensed,{$_.Licenses.AccountSkuId} | 
Export-CSV c:\userlist.csv -NoTypeInformation

 

  Posted by Admin on November 13, 2017