-
Notifications
You must be signed in to change notification settings - Fork 58
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
'sudo' ignores profile scripts? #26
Comments
This seems to have been the case for quite a while now. |
So how should I import my powershell scripts to be able to use it with sudo? |
Line 32 in c7116ac
@lukesampson why does it use -noprofile ? Seems to work just fine without it.
|
Was going to open an Issue exactly about this. Shouldn't it just use PS Profiles if present? It might delay the command execution, though. |
I have my powershell profile in C:\Users\Username\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1. I added some custom functions and aliases there that need admin privileges which I can access without problems while running powershell as administrator and typing
MyFunction
but on non-elevated powershellsudo MyFunction
doesn't even recognize the function name and throws error:The text was updated successfully, but these errors were encountered: