Powershell snapins loaded when starting powershell

HI All,

I want the following snapins to automatically load when I start powershell:

Add-PSSnapin VMware.VimAutomation.Core
Add-PSSnapin Quest.ActiveRoles.ADManagement

how can I do this?

Thank you in advance.

Kelly GarciaSenior Systems AdministratorAsked:
Who is Participating?

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

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.

Subash SundharanIT Infrastructure Architect Commented:
Add those commands to your PowerShell profile

Type $profile in PowerShell console.. Then you will get the profile path..


If the file is not available in the path then create it and add the Add-PSSnapin commands tot he file.. restart the console then it should work as expected..

For more information read the following article..


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
Zephyr ICTCloud ArchitectCommented:
You can do this by putting them in your profile (if it exists, otherwise create one).

Very easy how-to (also to create the profile if need be) for this here
Modify your PowerShell profile. It will be located on your local profile or home directory.



If the path and file does not exist create them. Once done add your 2 lines.

Add-PSSnapin VMware.VimAutomation.Core
Add-PSSnapin Quest.ActiveRoles.ADManagement

They will load when you start PowerShell.
David Johnson, CD, MVPOwnerCommented:
don't forget that the ISE has its own profile.
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

From novice to tech pro — start learning today.