Sep 06 2018
05:53 AM
- last edited on
Apr 07 2022
05:28 PM
by
TechCommunityAP
Sep 06 2018
05:53 AM
- last edited on
Apr 07 2022
05:28 PM
by
TechCommunityAP
Hi,
I have implemented an Azure Log Analytics demo environment including Windows 7 SP1, Windows 8.1 and Windows 10 client machines.
Microsoft Monitoring Agent is installed on all three machines.
The Upgrade Readiness Deployment Script has finished on the Windows 7 SP1 and Windows 8.1 machines without any problems and 0 error(s). Both machines are already visible within the Azure Log Analytics dashboard/Upgrade Readiness.
Unfortunately, this is not the case for the Windows 10 client. Everytime I run the script (no difference between run as (local) administrator/run as system) I receive an Access is denied error message within the command prompt although in the log files of the script it is written: Success : Script succeeded
Microsoft Windows [Version 10.0.16299.611]
(c) 2017 Microsoft Corporation. All rights reserved.
C:\Windows\system32>cd C:\Users\USERNAME\Desktop\Pilot
C:\Users\USERNAME\Desktop\Pilot>RunConfig.bat
Running config batch
1 file(s) copied.
Access is denied.
0 file(s) copied.
PsExec v2.11 - Execute processes remotely
Copyright (C) 2001-2014 Mark Russinovich
Sysinternals - www.sysinternals.com
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe exited on Win10Client003 with error code 0.
0
Access is denied.
0 file(s) copied.
What is the problem with the Windows 10 client here?
Best regards
Joseph
Sep 24 2018 12:12 AM
on Windows 10 we get the same error message. what's wrong. the ntfs right are standard.it would be nice MS have a fix for this script
Oct 16 2018 05:42 PM - edited Oct 16 2018 05:43 PM
Same error here, glad I'm not the only one.
Nov 07 2018 06:28 PM
The reason this doesn't work is because MS decided it wasn't necessary to sign their scripts even though the guidance is to use RemoteSigned as the execution policy. You need to unblock the .PS1 script and allow it to run. I'm just going to sign them once I've configured it. This should be covered in the documentation.
Jan 09 2019 04:30 PM
For me, it turned out to be permissions on the powershell.exe.config file. The Pilot script backs the original up, copies in a new one, runs the PowerShell script with an -ExecutionPolicy Bypass flag on it (which should allow for unsigned scripts as I understand it), and then copies the backup config back to the original. It was failing when it attempted to make a backup and again when trying to restore the backup.
Now, should I have needed to adjust the permissions? Probably not. But at least the 'access denied' errors went away.
YMMV.