Powershell

How to make  Powershell  a permanent
alanlam123Asked:
Who is Participating?
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.

aikimarkCommented:
"a permanent" what?
0
Jose Gabriel Ortega CEE Solution Guide - CEO Faru Bonon ITCommented:
We are not wizards or fortune tellers...
1
CodeTwo SoftwareSoftware DeveloperCommented:
Hi alanlam123,
Have you, by any chance, meant "how to make a constant in PowerShell?" If that is the case, use:
New-Variable -Name 'CONST' -Value 'Constant' -Option Constant

Open in new window

If that is not what you mean, like said above, we need some clarification.
0
ON-DEMAND: 10 Easy Ways to Lose a Password

Learn about the methods that hackers use to lift real, working credentials from even the most security-savvy employees in this on-demand webinar. We cover the importance of multi-factor authentication and how these solutions can better protect your business!

Chirag NagrekarSystem AnalystCommented:
Do you mean by how to execute .ps1 as powershell always ?
0
alanlam123Author Commented:
Hi

I was trying to setup a permanent profile on the Powershell.
0
oBdACommented:
Depending on what exactly it is you want to do, there are four different ways to automatically run a script, based on whether it's per user or per machine, and whether it's for all hosts (the console and the ISE are different hosts, for example) or just the regular PS console.
* All Users, all hosts: C:\Windows\system32\Windows­PowerShell\v1.0\profile.ps1
* All users, only Microsoft.PowerShell host: C:\Windows\system32\Windows­PowerShell\v1.0\Microsoft.Power­Shell_profile.ps1
* Single user, all shells: %UserProfile%\Documents\Windows­PowerShell\profile.ps1
* Single user, only Microsoft.PowerShell host: %UserProfile%\Documents\WindowsPowerShell\Micro­soft.PowerShell_profile.ps1
Don't worry if you can't find them, none of these exist by default.
Details here, for example:
Create Custom Windows PowerShell Profiles (.ps1)
https://technet.microsoft.com/en-us/library/2008.10.windowspowershell.aspx
0

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
alanlam123Author Commented:
Thanks
0
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.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.