The script is also making assumptions about shares and server security that it should not be. The script just is not able to see the security of the selected share path even though everyone has read/write in perms and on the share. Even though with the way sccm works it should NOT need that as tasks are run with either the computer system account (our env.) or a named specific user. I cannot get it to go past this message (
The share for log folder '\\serverFQDN\deploymentlogs\OSUpgrades' does not allow read/write permission for the Everyone group. Press 'Y' to grant read/write permission to the Everyone group or press 'N' to abort.
) and as a result it could be breaking other parts of the script within the start-deployment function .
#### Error starts here ####
Start-Deployment : Exception thrown
At D:\Scripts\Win10Deployment.ps1:437 char:1
+ Start-Deployment
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Start-Deployment
Start-Deployment : System.Management.Automation.MethodInvocationException: Exception calling "ReadKey" with "0"
argument(s): "Cannot read keys when either application does not have a console or when console input has been
redirected from a file. Try Console.Read." ---> System.InvalidOperationException: Cannot read keys when either
application does not have a console or when console input has been redirected from a file. Try Console.Read.
at System.Console.ReadKey(Boolean intercept)
at CallSite.Target(Closure , CallSite , Type )
--- End of inner exception stack trace ---
at System.Management.Automation.ExceptionHandlingOps.CheckActionPreference(FunctionContext funcContext, Exception
exception)
at System.Management.Automation.Interpreter.ActionCallInstruction`2.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
at System.Management.Automation.Interpreter.EnterTryCatchFinallyInstruction.Run(InterpretedFrame frame)
At D:\Scripts\Win10Deployment.ps1:437 char:1
+ Start-Deployment
+ ~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,Start-Deployment
Removing objects created by script