exchange command in powershell

sina2011sina2011 Posts: 239Member ■□□□□□□□□□
hey guys

I have abit of a problem long story short im trying to put in this command in powershell but it gives me an error and im not sure where to look in google for solution.

This is the command that I placed in Powershell on my exchange server:

Get-ExchangeServer VAN-EX1 | Format-List Name,Domain,Site,fqdn,Server role


This is the Error I get:

PS C:\Windows\system32> Get-ExchangeServer VAN-EX1 | Format-List Name,Domain,Site,fqdn,ServerRole
The term 'Get-ExchangeServer' is not recognized as the name of a cmdlet, function, script file, or operab
eck the spelling of the name, or if a path was included, verify that the path is correct and try again.
At line:1 char:19
+ Get-ExchangeServer <<<< VAN-EX1 | Format-List Name,Domain,Site,fqdn,ServerRole
+ CategoryInfo : ObjectNotFound: (Get-ExchangeServer:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException

The Things I have done are:

I have installed powershell correctly
Ran the powershell cmdlet "run as administrator"
Im also using Windows Server 2008

but still no luck.

Im using the microsoft Press Book Exchange 2010 If you have done this lab its on page 40 Chapter1.


Thanks.

Comments

  • ITVinceITVince Posts: 143Member
    Why are you trying to run 'Get-ExchangeServer' on Windows Server 2008 instead of the Exchange 2010 server? Windows Server 2008 is not an exchange server, and therefore 'Get-ExchangeServer' cmdlet is not an available command to use in this OS version. (This is all just a guess) I just know that different OS's have different available PS commands using various built in PSCONSOLE files.

    Read here: Get-ExchangeServer: Exchange 2010 SP1 Help

    These are all CMDLET's that are only available for Exchange 2010: http://technet.microsoft.com/en-us/library/bb124413.aspx
    Currently studying for:
    MCTS 70-642 Network Infrastructure
  • -Foxer--Foxer- Posts: 151Member
    Are you using Powershell, or the Exchange Management Shell?

    I ran that command just fine from my windows 7 computer using the Exchange Management Shell. Try that instead.
  • sina2011sina2011 Posts: 239Member ■□□□□□□□□□
    yeah that command works in management console but in my lab before when I tried to do this command in powershell it didnt work:


    Add-WindowsFeature NET-Framework,RSAT-ADDS,Web-Server,Web-Basic-Auth,Web-Windows-Auth,Web-Metabase,Web-Net-Ext,Web-Lgcy-Mgmt-Console,WAS-Process-Model,RSAT-Web-Server,Web-ISAPI-Ext,Web-Digest-Auth,Web-Dyn-Compression,NET-HTTP-Activation,RPC-Over-HTTP-Proxy,Desktop-Experience -Restart

    It gave me a red warning so I went and installed them manually.
  • sina2011sina2011 Posts: 239Member ■□□□□□□□□□
    there is something wrong with my powershell when I tried to typed Import-Module ServerManager then pressed enter it gave me a red error message I cant show you the red message because im currently installing exchange again because I think maybe I left something out during the installation process so once I get it all installed and try again if it doesnt work ill paste the error message.

    Thanks.
  • undomielundomiel Posts: 2,818Member
    Are you using 2008 or 2008 R2? ServerManager is not available in standard 2008. It sounds like you're getting a bit ahead of yourself, not understanding the commands that you are trying to run. I'd recommend checking out this bit of material first: Amazon.com: Windows Powershell in Action (9781935182139): Bruce Payette: Books

    Though also judging from some of your previous posts you may want to go over some Network+ material before hand as well to get a grasp of routing and nat.
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
  • sina2011sina2011 Posts: 239Member ■□□□□□□□□□
    hey undomiel

    Im Using Server 2008 Enterprise I have no experience in Exchange im just going by the book I have the MS Press configuring Exchange 2010.

    Thanks.
  • sina2011sina2011 Posts: 239Member ■□□□□□□□□□
    This is the error message im getting in powershell.
  • sina2011sina2011 Posts: 239Member ■□□□□□□□□□
    hey I uploaded the screenshot but I had alook at it and its abit small basically just typed Import-Module ServerManager.

    I have tried zooming it in then doing a screenshot but when I come to preview it on the forum its comes abit small I hope you can figure out what its saying.

    thanks.
  • undomielundomiel Posts: 2,818Member
    What does the error message say to you? Have you tried searching up any of the unfamiliar terms?
    Jumping on the IT blogging band wagon -- http://www.jefferyland.com/
  • jibbajabbajibbajabba Posts: 4,317Member
    sina2011 wrote: »
    hey I uploaded the screenshot but I had alook at it and its abit small basically just typed Import-Module ServerManager.

    I have tried zooming it in then doing a screenshot but when I come to preview it on the forum its comes abit small I hope you can figure out what its saying.

    thanks.

    The ServerManager module is only available on Server 2008R2 and not R1

    You can try installing the ServerManager-PSH-Cmdlets and try again.
    Dism.exe /Online /Enable-Feature /FeatureName:ServerManager-PSH-Cmdlets
    
    My own knowledge base made public: http://open902.com :p
  • sina2011sina2011 Posts: 239Member ■□□□□□□□□□
    hey guys

    thanks for your reples as gomjaba said its only available on R2 so i went and powered a R2 machine and placed the commands in powershell and it worked.

    Thanks guys for all your input I really appreciate it.

    btw gomjaba the command you gave me the dism.exe etc command didnt work just to let you know.

    thanks.
  • jibbajabbajibbajabba Posts: 4,317Member
    sina2011 wrote: »
    hey guys

    thanks for your reples as gomjaba said its only available on R2 so i went and powered a R2 machine and placed the commands in powershell and it worked.

    Thanks guys for all your input I really appreciate it.

    btw gomjaba the command you gave me the dism.exe etc command didnt work just to let you know.

    thanks.

    Probably works on R2 too only :-/
    My own knowledge base made public: http://open902.com :p
  • sina2011sina2011 Posts: 239Member ■□□□□□□□□□
    yeah maybe but thanks for the help I appreciate it heaps :)
Sign In or Register to comment.