Avatar of Dan
Dan
Flag for United States of America asked on

exchange snapin problem

why is it that everytime I open up exchange shell, I have to type the following command, or I get the error "the term "command" is not recognized as the name of a cmdlt....."

Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;

Is there a way to have this stick, so I don't have to do this every time I open the exchange shell?
PowershellExchange

Avatar of undefined
Last Comment
Dan

8/22/2022 - Mon
SOLUTION
Justin Yeung

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Dan

ASKER
yes, even when I run as administrator, still get the same error.
Jose Gabriel Ortega Castro

Use the icon "Exchange Management Shell" that would make the psnapin load of that for you.

emc.png
Dan

ASKER
yes, that's the icon I always use
shell
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy
SOLUTION
Nicky Raven

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
Dan

ASKER
I'm running the exchange management shell ON the Exchange server, not on any other computer, that's why I find it very strange that I have add the snapin every time I run the program.
Jose Gabriel Ortega Castro

Well what is happening with exchange server, it's that it does PSREMOTING into the "exchange server" sometimes it doesn't work, and when it fails you need to add the snap-in manually to get it working, when you click the exchange management console ( which is a shortcut it load the snaping behind scenes, if it fails, you need to do it manually).
Dan

ASKER
Well, whatever it's suppossed to do behind scenes, it's not working, it fails everytime.   So is there a log I can look at to see why it's failing?
There has to be a reason, it's strange for it to fail every time I start the management console.
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Jose Gabriel Ortega Castro

Dan

ASKER
I am running exchange 2013, not 2007.
I just restarted the server, tried to open the exchange toolbox and I get this error message:
"the term 'get-queue' is not recognized as the name of a cmdlet, function, script file, or etc...."
So I'm logged on my exchange server directly, with full domain admin rights.
This is poor programming on MS, I'm sorry.  I'm just so tired of MS.

So I manually in the exchange shell, ran the command,
Add-PSSnapin Microsoft.Exchange.Management.PowerShell.SnapIn;

It was successful, but when I go to open up the toolbox, I'm still getting that error message.

So what do I do next?
SOLUTION
Jose Gabriel Ortega Castro

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Dan

ASKER
Yes I know that  if I run the command in the shell, it doesn't apply to the toolbox, but I thought it's worth it :)
That's why I even restarted the server.  I looked through the event log and there's nothing there that looks like it's something causing a problem.
All of life is about relationships, and EE has made a viirtual community a real community. It lifts everyone's boat
William Peck
ASKER CERTIFIED SOLUTION
Tom Cieslik

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
⚡ FREE TRIAL OFFER
Try out a week of full access for free.
Find out why thousands trust the EE community with their toughest problems.
Dan

ASKER
Tom, I have every file that you listed in my bin folder.  I just double checked.

At this point, it's not worth my time to try to recopy the files, as I'm planning to install EX2016 tonight on a new server.
Dan

ASKER
Thanks everyone for your input,