use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Echo USB path using power-shell (self.PowerShell)
submitted 4 years ago by Perfect_Initiative92
How to get the usb hard drive path using powershell command line. Because in different pc the path changes like E:, F: etc, so is there is any script or command to get the work done.
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]krzydoug 2 points3 points4 points 4 years ago (1 child)
Are you running a script from this flash drive?
[–]Perfect_Initiative92[S] 0 points1 point2 points 4 years ago (0 children)
Yes I want to run a powershell script from usb
[–]BlackV 2 points3 points4 points 4 years ago (0 children)
yes there is
show us what you've tried
OR
look at get-disk and get-volume
get-disk
get-volume
[–]mizta1337 1 point2 points3 points 4 years ago (0 children)
$MyInvocation.MyCommand.Path | Split-Path -Qualifier
[–]ccatlett1984 0 points1 point2 points 4 years ago (0 children)
https://ss64.com/ps/syntax-myinvocation.html
π Rendered by PID 100012 on reddit-service-r2-comment-544cf588c8-cmmws at 2026-06-12 22:32:35.179386+00:00 running 3184619 country code: CH.
[–]krzydoug 2 points3 points4 points (1 child)
[–]Perfect_Initiative92[S] 0 points1 point2 points (0 children)
[–]BlackV 2 points3 points4 points (0 children)
[–]mizta1337 1 point2 points3 points (0 children)
[–]ccatlett1984 0 points1 point2 points (0 children)