This TechNet page says the location of a console profile file for the current user only and all shells shall be:


In my case, the %UserProfile% points to:


So, I created the following file:


Which at this very moment contains 2 functions:

function sha256sum([string]$arg) {
    (Get-FileHash -Algorithm SHA256 $arg | Select -ExpandProperty Hash).ToLower()

function sha512sum([string]$arg) {
    (Get-FileHash -Algorithm SHA512 $arg | Select -ExpandProperty Hash).ToLower()

But calling these functions throws an error:

PS C:\Users\vlastimil> sha512sum
sha512sum : The term 'sha512sum' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:1
+ sha512sum
+ ~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (sha512sum:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

As I know very little of Windows, I don't know where the problem is.

OS: Windows 10 Pro 1709


Profile location revealed with:


Thus, after changing the path + name, the problem has been solved.


There is a difference if you are running powershell console, or powershell ISE.


Where you put your profile will only work when run from the console. ISE will not see or use this profile.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.