Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Errors in installation and script running restrictions #35

Open
SelaO opened this issue Sep 18, 2017 · 9 comments
Open

Errors in installation and script running restrictions #35

SelaO opened this issue Sep 18, 2017 · 9 comments

Comments

@SelaO
Copy link

SelaO commented Sep 18, 2017

I'm getting the following errors on win 10, PS 5:

PS C:\Users\S> iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/pecigonzalo/Oh-My-Posh
master/install.ps1'))
. : The term './tools/utils.ps1' is not recognized as the name of a cmdlet, function, script file, or operable
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:7 char:3
+ . ./tools/utils.ps1
+   ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (./tools/utils.ps1:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Check-Recommends : The term 'Check-Recommends' is not recognized as the name of a cmdlet, function, script file, or
operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try
again.
At line:10 char:3
+   Check-Recommends
+   ~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Check-Recommends:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Check-Dependencies : The term 'Check-Dependencies' is not recognized as the name of a cmdlet, function, script file,
or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and
try again.
At line:11 char:3
+   Check-Dependencies
+   ~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (Check-Dependencies:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

Deleting C:\Users\S\.oh-my-posh
Cloning Oh-My-Posh from Github
Cloning into 'C:\Users\S\.oh-my-posh'...
remote: Counting objects: 462, done.
remote: Total 462 (delta 0), reused 0 (delta 0), pack-reused 462
Receiving objects: 100% (462/462), 96.28 KiB | 0 bytes/s, done.
Resolving deltas: 100% (185/185), done.
Installting Oh-My-Posh Module
. : The term 'C:\Users\S\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1' is not recognized as the name
of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included,
verify that the path is correct and try again.
At line:43 char:2
+ .$PROFILE
+  ~~~~~~~~
    + CategoryInfo          : ObjectNotFound: (C:\Users\S\Docu...ell_profile.ps1:String) [], CommandNotFoundException
    + FullyQualifiedErrorId : CommandNotFoundException

And later I get:

. : File C:\Users\S\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded because running
scripts is disabled on this system. For more information, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At line:1 char:3
+ . 'C:\Users\S\Documents\WindowsPowerShell\Microsoft.PowerShell_profil ...
+   ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

How do you properly install this?
Do I really have to unrestrict the script execution for this to work?

@leandrocrs
Copy link
Contributor

leandrocrs commented Sep 18, 2017

Did you tried enter inside

cd C:\Users\S\.oh-my-posh

and exec

iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/pecigonzalo/Oh-My-Posh
master/install.ps1'))

again?

@SelaO
Copy link
Author

SelaO commented Sep 18, 2017

This is what I get:

PS C:\Users\S\.oh-my-posh> iex ((new-object net.webclient).DownloadString('https://raw.githubusercontent.com/pecigonzalo
/Oh-My-Posh/master/install.ps1'))
. : File C:\Users\S\.oh-my-posh\tools\utils.ps1 cannot be loaded because running scripts is disabled on this system.
For more information, see about_Execution_Policies at http://go.microsoft.com/fwlink/?LinkID=135170.
At line:7 char:3
+ . ./tools/utils.ps1
+   ~~~~~~~~~~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess
Oh-My-Posh is already installed
. : File C:\Users\S\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1 cannot be loaded because running
scripts is disabled on this system. For more information, see about_Execution_Policies at
http://go.microsoft.com/fwlink/?LinkID=135170.
At line:43 char:2
+ .$PROFILE
+  ~~~~~~~~
    + CategoryInfo          : SecurityError: (:) [], PSSecurityException
    + FullyQualifiedErrorId : UnauthorizedAccess

@leandrocrs
Copy link
Contributor

First, try enable PS Execution Policy:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

@pecigonzalo
Copy link
Owner

Is this still a problem?

@daalekz
Copy link
Contributor

daalekz commented Mar 2, 2021

First, try enable PS Execution Policy:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

@pecigonzalo
Could this please be added to the main install readme? This command is still relevant as I have needed to change the execution policy on several machines. It may be helpful to others to have this command readily available for reference. Cheers!

@pecigonzalo
Copy link
Owner

Sure thing, could you send a PR @daalekz ?

@daalekz
Copy link
Contributor

daalekz commented Mar 10, 2021

here #42 @pecigonzalo 👍

@flopezre
Copy link

First, try enable PS Execution Policy:

Set-ExecutionPolicy -ExecutionPolicy RemoteSigned

Doesn't works :c

@pecigonzalo
Copy link
Owner

What fails @flopezre ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants