Powershell script issues
05/15/2017 1770 views
Trying to execute a powershell script via K1000. Trying to run a script (built by someone else) that disables SMBv1 (because of recent issues in the wild).
Works perfectly fine on Windows 7 machines (because it is a simple registry change) but on windows 8+ it will not work. I've tried various fixes already listed in these forums and such to no avail. Our kbox version is 6.4.x as is the agent.
The current kscript is set to run a batch file with the following:
powershell.exe powershell.exe -nonInteractive -ExecutionPolicy Bypass -File disablesmbv1.ps1 -verb RunAs
I've tried with only one specified powershell.exe and without the -verb RunAs. I've also run this as local system or as an admin account. I've also run this via "launch program" calling powershell and arguments being the -noninteractive... All come to the same results.
Disablesmbv1.ps1 script can be read and obtained here: https://github.com/TechWhispererCA/disable-smb1-powershell/blob/master/DisableSMB1.ps1
The script works file locally run on machine but when attempting to run via kbox (online kscript) it spits out the following error: The term 'Get-SmbServerConfiguration' is not recognized as the name of a cmdlet, function, script file...
Answer Chosen by the Author
Please log in to answer
Probably cause by a 32 bit process trying to call a 64 bit one, use this for your 64 bit machines
Answered 05/15/2017 by: HISDTechGuy