-
Notifications
You must be signed in to change notification settings - Fork 16
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Start-TranscriptIfSupportedError #40
Comments
Well, that's interesting, thanks for the report. There is nothing you could do, this seems like an internal error within MPSXM.psm1 (the helper module included). BIOS Sledgehammer uses the function Start-TranscriptTaskSequence() which uses the function Start-TransscriptIfSupported() and somewhere there the error happens. I can not make any sense from the error message, as the function do not call themselves with a -File parameter. The only thing I could imagine would be that the COM Object we are using from SCCM to get the log path is broken so it returns null for the path which causes this error. But this is not very likely. Can you maybe execute BIOS Sledgehammer using the batch file "RunVisible-Verbose.bat" and post a screenshot of the output (a smartphone capture will do as well)? This command displays more output which could be helpful to detect what is going on. |
Thanks for that. The screenshot helps that the error is not related to the SCCM log path being empty that I first suspected. You have renamed the script name, this was never tested but I can't think this to be the error. I added additional verbose output so also the file name of the log will be written. Please do the following:
|
I found the issue, as it says it tries to create the log file in X:\Windows\temp\smstslog, although i have placed the step later in the TS when it runs in the current OS. If i place the step when it is still in PE the script runs but fails at "Test-Environment". |
Thanks, but to be honest I still have no idea where this "-File" parameter error comes from. It should clearly run without issues within the OS itself. That it fails there but works in PE is really strange. And yes, some HP fail or do not work correctly in PE. Some of the them work fine in PE, but I never tested that and can't help you there. I will do some testing tomorrow, maybe the functions freaks out when a folder is read only or does not exist. |
I was able to identify the issue here. The function Start-TranscriptIfSupported() has one line to find out which log files already exist so it can create the next one. This line looks like this:
There we have the -File parameter but if the folder I have now added two fail safes:
The change is now live, please do the same as before:
If everything works as I hope, you might still get an error (because the log path does not exist), but BIOS Sledgehammer should finally run. |
Now it works, thanks! |
Good to hear, thanks for your patience. Closing issue. |
Hello!
Trying to run the script in a SCCM TS but i get this error when it runs:
Start-TranscriptIfSupported: A parameter cannot be found that matches parameter name 'File'.
\MPSXM.psm1: 552 char:5
Start-TranscpritIfSupported -Path $logPath -Name $logName -NewLog
CategoryInfo : AnvalidArgument: (:) [Start-TranscpirtIfSupported]. ParameterBindigException
FullyQualifiedErrorId : NamedParameterNotFound,Start-TranscpirtIfSupported
I've checked the code but cant find why i get this error, have any idea of what it could be?
The text was updated successfully, but these errors were encountered: