Powershell A Drive C Does Not Exist

9,856

So it seems that I had a bug in my Environment Variables, Path. Here is the screen shot of what I changed.
enter image description here


After trying to reboot and fail. Uninstalled .NET, reinstalled .NET, reinstalled a Powershell version and still fail. I ended up checking my Environment Variables. I had changed them a few years ago per a "fix" for JUNIT testing in Java programming.

Share:
9,856

Related videos on Youtube

ejbytes
Author by

ejbytes

Programming Languages: Java, C Programming: VB, HTML, CSS, PHP, MySQL, AS3, DOS batch-file script, some javascript Applications: PhotoShop, Premier Pro, Flash, Word, Excel, Access, OneNote, Outlook 3D Noobie -- Blender.org and Loving It! But so hard! My Sytem: Windows 7 Ultimate, PC - downgraded from 8.1. - Specs 10GB RAM, Intel Core, i5 3.4 GHz(4), x64, SP1 * Also have a Windows 10 Surface Pro 4 College Degrees: Mathematics Computer Science "If he gets up. We'll all get up. It'll be anarchy!" -- The Breakfast Club "Never memorize something that you can look up." -- Albert Einstein "Help me.... Help. Me. Help me, help you!" -- Jerry McGuire What I've experienced on this site: I've got to say for a community like this, I've seen a lot of juvenile attitude and unnecessary commentary. Jealousy and Envy. And bullying! I've seen a trend of angst over who get's the Answer first, full on tantrums and down-voting over it. It's really unfortunate because this should be a rich environment of higher education and reflection. It's always been my motto to be polite, professional, and courteous. These are things you should have been taught when you were a child. I've always learned by helping. Helping others is how I was able to grasp concepts and better understand subjects in college. I believe in being conservative and genuine and always being polite and courteous. The only criticism worth hearing is from a constructive and courteous person. I'm also a realist. Some people don't know how to be a gentleman. That's life I guess. Treat everyone on the internet as if they were standing right in front of you in a room full of peers. Don't hide behind your anonymity on the internet. Don't be a bully. Nobody like a "knowitall" either. Know something? Good for you. Contribute and be on your way, there is no need to comment to the rest of the contributors why your answer is better and belabor the point. That is so childish and chauvinistic. The internet has opened so many doors and it's only recently. We are in new waters. We must be descent and respectful. The internet might be temporary, you never know. New update: I am afraid that I must stop replying to rude comments, if not all comments, as the commentators just keep coming back for more; they are relentless and so rude and childish. It's truly unbearable. I've also noticed certain types and specific entities actually live on this site on a daily basis, as "Eager to please". Look that one up, it's not pretty. The types of people that are eager to please is a whole study group. Sites like this one creates a false identity attached to a point system of false worthiness... I found that this point system is very flawed and causes a lot of tension to otherwise intelligent people, and it brings out the worst in a lot of them.

Updated on September 18, 2022

Comments

  • ejbytes
    ejbytes over 1 year

    I am using a regular system, nothing virtual, my C drive is not mapped which I see in some forums. Environment path not set?

    I started a tutorial to learn Powershell, and the first thing I tried to execute was very simple:

    PS C:\Users\user> get-help get
    

    Error I receive:

    get-help : Cannot find drive. A drive with the name '.C' does not exist.
    At line:1 char:1
    + get-help get
    + ~~~~~~~~~~~~
        + CategoryInfo          : ObjectNotFound: (.C:String) [Get-Help], DriveNotFoundException
        + FullyQualifiedErrorId : DriveNotFound,Microsoft.PowerShell.Commands.GetHelpCommand
    

    Image: enter image description here


    System:
    Windows7, Powershell 4.0, .NET 4.5

    • Daniel B
      Daniel B over 8 years
      Notice how it says .C. That's certainly not what a valid drive letter looks like. Did you make any changes that could have caused this?
    • DavidPostill
      DavidPostill over 8 years
      Have you changed any of the powershell config files? For example C:\Users\{username}\Documents\WindowsPowerShell\Microsoft.Po‌​werShell_profile.ps1‌​?
    • ejbytes
      ejbytes over 8 years
      @DavidPostill All I did was install the required files from the microsoft website and tried to execute this line. I did not configure anything or touch any files that were installed. Simply run(cmd) then powershell just as the image demonstrates. Nothing else.
    • ejbytes
      ejbytes over 8 years
      General: What is with the down voting? Someone is on a spree of bad manners today. I checked out the question board and there are like 20 -1's in a row. Someone had too much to drink I think. Something wrong with the way I posed this question? Please do comment.
    • DavidPostill
      DavidPostill over 8 years
      @ejbytes Did you reboot after installing? I recall mine misbehaving after installing version 4.0 (it displayed the wrong version number until I rebooted).
    • ejbytes
      ejbytes over 8 years
      @DavidPostill So many rude and ignorant people out there. So eager to down vote to inflate one's own ego I think is the logical answer.
    • ejbytes
      ejbytes over 8 years
      @DavidPostill Powershell was already on my PC. The error. Then I installed another version. The same. Maybe I will uninstall my .NET and uninstall powershell. I'll post later after work to state if/if not it works out.
    • Vomit IT - Chunky Mess Style
      Vomit IT - Chunky Mess Style over 8 years
      @ejbytes Down votes are FREE and don't cost reputation on questions so you'll see this more often. In any case, I have some ideas but see if the simple stuff resolves first before I comment or add an answer. It'll likely be an answer otherwise I'll have to post a ton of comments. Start with the reboot as suggested and see if that resolves. If not, repost back and I'll keep an eye out for a response or an accepted answer, etc. before I do anything further. I don't want to polute the air too much so start with what you've been requested to do first and hopefully it is as simple as that.
    • ejbytes
      ejbytes over 8 years
      @DanielB I reboot. Still no. I uninstalled .NET. Reinstalled .NET. Reinstalled Powershell. Then I was thinking about your '.C' comment. I did change my Environment Variables a couple years ago per a "fix" for JUNIT testing in Java. In a forum it stated that a '.' must be added to the JUNIT path and must be in front (the first item in Environment Variables Path). So I took out the period, restarted a new terminal session and viola! It was the '.' in the Environmental Variables on my machine. I saw the '.C' in the message but didn't really think about the '.' because so many times it's necessary
    • ejbytes
      ejbytes over 8 years
      @LMFAO_A_JOKE Thank you for watching out. I discovered a wrench in my Environment Variables Path. It really didn't seem to stick out to me because in a lot of code I write sometimes I have to put the '.' in, in order for the code to recognize a path or current directory ( e.g. "./" vs "/" )
    • Vomit IT - Chunky Mess Style
      Vomit IT - Chunky Mess Style over 8 years
      @ejbytes No problem, I'm glad you resolved it.
  • ejbytes
    ejbytes over 8 years
    I realized that this is the desired output. It's a fresh install. What would cause this error?
  • DavidPostill
    DavidPostill over 8 years
    @ejbytes Have you changed any of the powershell config files? For example C:\Users\{username}\Documents\WindowsPowerShell\Microsoft.Po‌​werShell_profile.ps1
  • ejbytes
    ejbytes over 8 years
    No. I didn't configure anything. I am a noob for Powershell and Admin functions.