when the network profile of a Windows PC is set to public, there are firewall restrictions enabled which could prevent accessing the Computer from network. For example Windows Remoting.
Unfortunately in some cases the profile cannot be switch by the Network Gui(s) of windows.
if you want to customize your environment powershell has ability to load or execute some scripts at startup.
There are 4 files where you can define functions, aliases … The AllHosts variables does not mean Computers. Allhosts is relating to Programs with has an Interface to Powershell, for example Powershell itself, Powershell ISE and so on. While currenthost means a specfic program. The currenthost variables differ from Powershell to Powershell ISE.