Below Powershell script is not working without running as administrator.
Hi All,
I want to change the default font to Verdana on excel to all users on the intune endpoints.
But script is not working for some users. When checked directly on powershell i get the below errors
If i run as administrator it will work and the default font changes to verdana straight away.
Please help correcting the below script to run as administrator so that i can deploy to all intune devices.
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;
Hi All,I want to change the default font to Verdana on excel to all users on the intune endpoints.But script is not working for some users. When checked directly on powershell i get the below errors If i run as administrator it will work and the default font changes to verdana straight away.Please help correcting the below script to run as administrator so that i can deploy to all intune devices. 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; Read More