-
Notifications
You must be signed in to change notification settings - Fork 269
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
get-filehashes module foreach error #153
Comments
Can you try changing the conditional in Get-FileHashes.ps1 on line 232 from |
Changing the -gt 2.0 condition to -gt 8.0 returned the same error. |
Thanks. I'll dive into it some more. |
I get the same error on the following modules: Get-FileHashes |
@z4ns4tsu were you ever able to repro this? I need to try it in my lab, but the code clearly has a check for PS version and should work. |
Why isn't |
Because Get-FileHash isn't on every system with PowerShell, unfortunately. Not sure when that came in as a first order cmdlet, PSv4 maybe? There's still a huge install base of PSv2, sadly. |
Windows 10 doesn't do md5 hashes. To fix this go through all the hashing scripts and change md5 to sha512 or sha1 where it calls it. Or remove the call. |
Environment: PSv4 on target and source. Run as user with admin on both systems and with scripts "unblocked". Latest Kansa code.
Issue: When running the Get-FileHashes module against a single target host, I get the following error:
"Get-FileHashes reports error on COMPUTERNAME: "Missing opening '(' after keyword 'foreach'."
The command run is:
KANSAPATH\kansa.ps1 -Target COMPUTERNAME -ModulePath "KANSAPATH\Modules\Disk\Get-FileHashes.ps1 MD5,C:\Users\"
Thanks in advance!
The text was updated successfully, but these errors were encountered: