KB3191566 is the installation file for WMF for Windows 7. We could download it from the link below.
Also ,there are few prerequisites for install WMF 5.1on Windows 7. Please check the information in the link below:
Install and Configure WMF 5.1
uninstall WFM 3.0 firstly, also .NET Framework 4.5.2 is the minimum requirement.
wusa.exe /KB:2506143/uninstall /quiet /norestart
wusa.exe Win7-KB3191566-x64.msu /quiet /norestart
Meanwhile, you could check the steps below to install.
Updating powershell on windows 7
Hope this helps and please help to accept as Answer if the response is useful.