Below powershell script is not working on all the devices
Hi Guys,
I am trying to push below powershell script on intune through the Scripts option in Devices and it is working for some devices but not on all the devices. Basically we want to change the default font from Aptos to Verdana. Please suggest me here.. Powershell champs confirmed there is no issue in the script. FYI, if i run the below script directly in powershell as administrator it will work straight away and change the font in excel. If i don’t run powershell as administrator and run the script it will throw error saying registry access is not allowed. Please help.
if((Test-Path -LiteralPath “HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptions”) -ne $true) { New-Item “HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptions” -force -ea SilentlyContinue };
if((Test-Path -LiteralPath “HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptionsbinaryoptions”) -ne $true) { New-Item “HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptionsbinaryoptions” -force -ea SilentlyContinue };
New-ItemProperty -LiteralPath ‘HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptions’ -Name ‘extractdatadisableui’ -Value 1 -PropertyType DWord -Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath ‘HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptions’ -Name ‘font’ -Value ‘Verdana, 11’ -PropertyType String -Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath ‘HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptions’ -Name ‘disableautorepublish’ -Value 1 -PropertyType DWord -Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath ‘HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptions’ -Name ‘disableautorepublishwarning’ -Value 0 -PropertyType DWord -Force -ea SilentlyContinue;
New-ItemProperty -LiteralPath ‘HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptionsbinaryoptions’ -Name ‘fupdateext_78_1’ -Value 0 -PropertyType DWord -Force -ea SilentlyContinue;
Thanks,
Ram
Hi Guys,I am trying to push below powershell script on intune through the Scripts option in Devices and it is working for some devices but not on all the devices. Basically we want to change the default font from Aptos to Verdana. Please suggest me here.. Powershell champs confirmed there is no issue in the script. FYI, if i run the below script directly in powershell as administrator it will work straight away and change the font in excel. If i don’t run powershell as administrator and run the script it will throw error saying registry access is not allowed. Please help.if((Test-Path -LiteralPath “HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptions”) -ne $true) { New-Item “HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptions” -force -ea SilentlyContinue };if((Test-Path -LiteralPath “HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptionsbinaryoptions”) -ne $true) { New-Item “HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptionsbinaryoptions” -force -ea SilentlyContinue };New-ItemProperty -LiteralPath ‘HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptions’ -Name ‘extractdatadisableui’ -Value 1 -PropertyType DWord -Force -ea SilentlyContinue;New-ItemProperty -LiteralPath ‘HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptions’ -Name ‘font’ -Value ‘Verdana, 11’ -PropertyType String -Force -ea SilentlyContinue;New-ItemProperty -LiteralPath ‘HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptions’ -Name ‘disableautorepublish’ -Value 1 -PropertyType DWord -Force -ea SilentlyContinue;New-ItemProperty -LiteralPath ‘HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptions’ -Name ‘disableautorepublishwarning’ -Value 0 -PropertyType DWord -Force -ea SilentlyContinue;New-ItemProperty -LiteralPath ‘HKCU:SoftwarePoliciesMicrosoftoffice16.0exceloptionsbinaryoptions’ -Name ‘fupdateext_78_1’ -Value 0 -PropertyType DWord -Force -ea SilentlyContinue;Thanks,Ram Read More