I'm not having luck running a PowerShell script (automated) in Dell KACE (K2000) for a windows 10 sysprepped image. I keep getting the Task Error # 57 where it states that "The system cannot find the file specified." I haven't been able to find any good resolutions that work via my internet research. Here is how I have the Post-installation Task Detail in KACE set up:
Runtime environment: K2000 Boot Environment (Windows)
File: The following powershell script (disabling password complexity) is attached:
secedit /export /cfg c:\secpol.cfg
(gc C:\secpol.cfg).replace("PasswordComplexity = 1", "PasswordComplexity = 0") | Out-File C:\secpol.cfg
secedit /configure /db c:\windows\security\local.sdb /cfg c:\secpol.cfg /areas SECURITYPOLICY
rm -force c:\secpol.cfg -confirm:$false
Parameter: The following parameter is being used:
powershell.exe -nologo -executionpolicy bypass -WindowStyle hidden -noprofile -file "powershellscriptpasswordcomplexity.ps1"
What am I doing wrong or should I change the post-installation type? Am I using the wrong parameter?