last day (27 days later) » 

19:23
I just used the $env:USERPROFILE because it's guaranteed (or at least should be) to always return your user profile directory in Windows, so the result should be something like C:\Users\<your_windows_user_name>\wsl\coniferous_ubuntu_old.
The actual location doesn't matter, but I find the user profile directory is a good, reliable option for a lot of people. D:\WSL\... would also be acceptable, if you have a good fast D: drive.
The $env: is the PowerShell method for getting an environment variable. Some other examples are $env:COMPUTERNAME and $env:USERNAME. So the same directory will typically be accessible at C:\Users\$env:USERNAME\WSL.
@coniferous Welcome!
But there's no reason you can't just "hard-code" your profile name. I just don't know for sure what your Windows username is, so I go with the $env:... to be safe.
Keep in mind that @ tagging will send a notification even if I happen to not be looking at this chat room ...
Ohh.. I get the syntax now. I didn't understand that the $env was just applying to USERNAME and thought it was doing something weird like registering the path to environment variables somehow
Right - Nothing magic. Just trying to make it determinant.
Also, again, thank you so much for your help with all of this... I really appreciate it... And for showing me chats on here! I was looking for a way to do this
So, for this command...
Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss\ |
ForEach-Object {
(Get-ItemProperty $_.PSPATH) | Where-Object { $_.DistributionName -eq "Ubuntu-18.04" }
} | Tee-Object -Variable ubuntuDist

Should it still be Ubuntu-18.04 if I'm not seeing that when I run wsl --list? I am seeing coniferous_ubuntu, though
@NotTheDr01ds
19:46
@coniferous Sorry, in and out (some serious medical issues going on with a family memory - We're talking brain surgery :-/ ). So if I disappear for a bit ...
Yes, that's true - The Ubuntu-18.04 was from the first question.
Get-ChildItem HKCU:\Software\Microsoft\Windows\CurrentVersion\Lxss\ |
ForEach-Object {
(Get-ItemProperty $_.PSPATH)
}
That will give you all the distributions and their locations.
But won't save it to a variable ...
@coniferous Which one are you trying to do what with at this point? ;-)

  last day (27 days later) »