For one thing, you never invoke the function in your PowerShell script. Add the statement "Get-Value" at the end.
I use code similar to below in a bat file to run a PowerShell script:
@Echo off
PowerShell -Command "& {.\Script1.ps1}"
Finally, you should ask your question in the PowerShell forum.
https://social.technet.microsoft.com/Forums/en-US/home?forum=winserverpowershell