"~" is only valid in the filesystem provider (at least in our case) e.g.
C:\Source> dir ~ Directory: C:\Users\glenn.sarti Mode LastWriteTime Length Name ---- ------------- ------ ---- d----- 3/02/2018 9:18 PM .bundle d----- 7/02/2018 4:28 PM .cache ~~~ a--- 20/06/2018 8:21 PM 224256 .wakatime.db a--- 20/06/2018 8:21 PM 18493628 .wakatime.log C:\Source> get-psdrive Name Used (GB) Free (GB) Provider Root CurrentLocation ---- --------- --------- -------- ---- --------------- Alias Alias C 331.15 145.19 FileSystem C:\ Source Cert Certificate \ Env Environment Function Function HKCU Registry HKEY_CURRENT_USER HKLM Registry HKEY_LOCAL_MACHINE Variable Variable WSMan WSMan C:\Source> cd alias: Alias:\> dir ~ Get-ChildItem : Cannot retrieve the dynamic parameters for the cmdlet. Home location for this provider is not set. To set the home location, call "(get-psprovider 'Alias').Home = 'path'". |