Can't Run Power Shell

Windows 8.1

Tried to run PowerShell and got
------------------------------------------------------------------
Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.

PS C:\Windows\System32\WindowsPowerShell\v1.0> The shell cannot be
started. A failure occurred during initialization:
Absolute path information is required.
------------------------------------------------------------------
What is wrong? SFC /SCANNOW shows no problems.
eschampAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

JohnBusiness Consultant (Owner)Commented:
Open cmd.exe with Run as Administrator.  Run powershell /?  It should run. Does it?
JustInCaseCommented:
Looks like you are missing path (I guess that this is reason) or you don't have poweshell installed.

Path:
System properties - environment variable
System variable
New
Variable name: PSmodulePath
Variable value: %SystemRoot%\system32\WindowsPowerShell\v1.0\Modules\

Install Powershell
eschampAuthor Commented:
Thanks, but that variable exists. Powershell is definitely installed.

They must be referring to  a different path, no?
Creating Active Directory Users from a Text File

If your organization has a need to mass-create AD user accounts, watch this video to see how its done without the need for scripting or other unnecessary complexities.

JohnBusiness Consultant (Owner)Commented:
Did you try what I asked?
eschampAuthor Commented:
John Hurst, yes, it does.
JohnBusiness Consultant (Owner)Commented:
So then use Run as Administrator to run Power Shell. Many commands need admin privileges anyway.
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Make sure that the reg value  "Personal" in HKCU\Software\Microsoft\Windows\CurrentVersion\UserShellFolders\ contains a complete path, something like c:\ (not C:).
eschampAuthor Commented:
Olemo, UserShellFolders does not exist.
eschampAuthor Commented:
John Hurst -- when I select PowerShell from the menu of programs ans "run as administrator", I get the path error message.
JohnBusiness Consultant (Owner)Commented:
I can run Power Shell with Run (Win+R) and it comes up fine. I do not have the registry key referred to above, so that key does not appear to be necessary.

I am using Windows 8.1 Pro 64-bit. Are you using Pro?  (not Home).

If everything is exhausted, try running DISM to repair the system.

Open cmd.exe with Run as Administrator.
DISM.exe /Online /Cleanup-Image /Scanhealth (takes 15 - 20 minutes).
DISM.exe /Online /Cleanup-Image /Restorehealth (takes 15 - 20 minutes).
Restart the computer and test.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
eschampAuthor Commented:
Got this:

C:\Windows\system32>DISM.exe /Online /Cleanup-Image /Scanhealth

Deployment Image Servicing and Management tool
Version: 6.3.9600.17031


Error: 11

You cannot service a running 64-bit operating system with a 32-bit version of DISM.
Please use the version of DISM that corresponds to your computer's architecture.

The DISM log file can be found at C:\Windows\Logs\DISM\dism.log

????
JohnBusiness Consultant (Owner)Commented:
I have never seen that problem before.

Try this.

Open cmd.exe with Run as Administrator
Go to (CD) c:\windows\syswow64>
At the prompt above, run c:\windows\system32\dism.exe  ....

Does this work?
eschampAuthor Commented:
Hmmm... Actually, I didn't cd to c:\windows\syswow64 because of using the full pathname and now the command is running!

Why?
JohnBusiness Consultant (Owner)Commented:
No sure why. If the command is running, let us know what happens.
eschampAuthor Commented:
/scanhealth:
No component store corruption detected.
The operation completed successfully.

/restorehealth:
The restore operation completed successfully. The component store corruption was repaired.
The operation completed successfully.

Now what?
JohnBusiness Consultant (Owner)Commented:
Go Win+R and type Powershell and enter

What happens?
eschampAuthor Commented:
Windows PowerShell
Copyright (C) 2014 Microsoft Corporation. All rights reserved.

PS C:\Users\Peter> The shell cannot be started. A failure occurred during initialization:
Absolute path information is required.
JohnBusiness Consultant (Owner)Commented:
Something is wrong with your computer. DISM did not provide errors, but something is wrong.
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
Are you running the x86 or x64 image of PowerShell?
Qlemo"Batchelor", Developer and EE Topic AdvisorCommented:
You might also check for
HKCU\Software\Microsoft\Windows\CurrentVersion\Explorer\User Shell Folders
to have only paths starting with %userprofile%, and then check what
  cmd /k set userprofile
displays as path. I don't think it is the issue, but we want to be sure about it.
eschampAuthor Commented:
The "set userprofile" path is that of my home directory: C:\Users\[userid]

Most of the User Shell Folders have %userprofile% as the start of the pathname but some have E:\[userid] as the start. The latter are the directories that I thought I had relocated from off my new SSD drive to a separate magnetic drive.

Also, the key name for the Downloads directory is {374DE290-123F-4565-9164-39C4925E467B} ... What's the meaning of that?

Thanks.
eschampAuthor Commented:
Well, I guess I really have to reinstall Windows "real soon now". Not looking forward to that.
JohnBusiness Consultant (Owner)Commented:
Since DISM did not fix the problem (DISM is very powerful) and since I know what you are trying to do works on my own machine, then, yes, it is now a good long term solution to reinstall Windows.
eschampAuthor Commented:
The key name for the Downloads directory is {374DE290-123F-4565-9164-39C4925E467B} ... What's the meaning of that?
JohnBusiness Consultant (Owner)Commented:
Downloads (on my machines) is a shortcut to the location of the files. I think the numeric description above is just that physical shortcut).
eschampAuthor Commented:
Why would only that key have that long string instead of a folder name??
JohnBusiness Consultant (Owner)Commented:
I think that is how Windows does .lnk but I am not sure
JustInCaseCommented:
This can help you to understand that. :)
Special folders in Windows have their own GUID it is always the same - full list of GUIDs for known folders.
JohnBusiness Consultant (Owner)Commented:
Also special folders do not have a lot to do with Powershell so far as I know and this computer with Powershell issues also cannot run DISM which means it has issues.
eschampAuthor Commented:
BTW, powershell works now. I guess DISM fixed things.
JohnBusiness Consultant (Owner)Commented:
Hey!  Good to know. DISM is very powerful and normally it would fix things. I thought it was not working, but glad it did and got you going.
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Powershell

From novice to tech pro — start learning today.