Link to home
Start Free TrialLog in
Avatar of Kelly Garcia
Kelly GarciaFlag for United Kingdom of Great Britain and Northern Ireland

asked on

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.

Kellu
ASKER CERTIFIED SOLUTION
Avatar of SubSun
SubSun
Flag of India image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
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.

Example.

C:\Users\<username>\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

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.
don't forget that the ISE has its own profile.
Microsoft.PowerShellISE_profile.ps1