The Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.Admin' is not installed on this computer

hi all,
i am using Exchange server 2013.
when i run the below code i got the following error.
RunspaceConfiguration rsConfig = RunspaceConfiguration.Create();
PSSnapInException snapInException = null;
PSSnapInInfo info = rsConfig.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.Admin", out snapInException);
Runspace myRunSpace = RunspaceFactory.CreateRunspace(rsConfig);
myRunSpace.Open();
Pipeline pipeLine = myRunSpace.CreatePipeline();
Command myCommand = new Command("Get-Mailbox -ResultSize Unlimited");
pipeLine.Commands.Add(myCommand);
Collection<PSObject> commandResults = pipeLine.Invoke();
Error :
The Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.Admin' is not installed on this computer.
when i run the command  get-pssnapin
result : 
Name : Microsoft.PowerShell.Core
PSVersion : 3.0
Description : This Windows PowerShell snap-in contains cmdlets used to manage components of Windows PowerShell
when i run below  command 
get-pssnapin -registered
result is:
PS C:\Users\Administrator> get-pssnapin -registered
Name : EnginePSSnapin
PSVersion : 2.0
Description : Register cmdlets for Content Engine
Name : HostControllerPSSnapIn
PSVersion : 2.0
Description : Register cmdlets for Host Controller
Name : InteractionEnginePSSnapIn
PSVersion : 2.0
Description : Register cmdlets for InteractionEngine
Name : JunoPSSnapin
PSVersion : 2.0
Description : Register cmdlets for Juno
Name : Microsoft.Exchange.Management.PowerShell.E2010
PSVersion : 1.0
Description : Admin Tasks for the Exchange Server
Name : Microsoft.Exchange.Management.PowerShell.Setup
PSVersion : 1.0
Description : Setup Tasks for the Exchange Server
Name : Microsoft.Exchange.Management.PowerShell.SnapIn
PSVersion : 1.0
Description : Admin Tasks for the Exchange Server
Name : Microsoft.Exchange.Management.Powershell.Support
PSVersion : 1.0
Description : Support Tasks for the Exchange Server
Name : Microsoft.Forefront.Filtering.Management.PowerShell
PSVersion : 2.0
Description : Microsoft Forefront Filtering PowerShell Interface
Name : SearchCorePSSnapIn
PSVersion : 2.0
Description : Register cmdlets for SearchCore
Name : WDeploySnapin3.0
PSVersion : 2.0
Description : This is a PowerShell snap-in that contains cmdlets for managing Microsoft Web Deployment infrastructure
All powershell commands is installed fine .
but still I am getting error
The Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.Admin' is not installed on this computer
 

Hi Olaf Reitz,
After running the command still i am getting same error,
The Windows PowerShell snap-in 'Microsoft.Exchange.Management.PowerShell.SnapIn' is not installed on this computer
please see below my task and i achieved so far.
i need to get list of Users in C# from Exchange Server. for that i  created new User [[email protected]]
in Exchange Server , then i give Full Access Permissions to that User to Access all other Mail Boxes.
By giving below command in PowerShell  I am getting all Users List . 
Get-Mailbox -ResultSize Unlimited
i need the same list In C# code. for that I
tried with below code.
 Here i got only particular user [ [email protected]] details , instead of list.
SecureString secureString = new SecureString();
string myPassword = "EIS2014!@#"; string username = "[email protected]";
foreach (char c in myPassword)
secureString.AppendChar(c);
PSCredential ExchangeCredentials = new PSCredential(username, secureString);
WSManConnectionInfo connectionInfo = new WSManConnectionInfo(new Uri("http://ExchangeServer.admin.com/powershell ), "http://schemas.microsoft.com/powershell/Microsoft.Exchange , ExchangeCredentials);
Runspace runspace = System.Management.Automation.Runspaces.RunspaceFactory.CreateRunspace(connectionInfo);
runspace.Open();
string newCommand = "Get-Mailbox | Get-MailboxPermission";
Pipeline cmd = runspace.CreatePipeline(newCommand);
Collection<PSObject> results = cmd.Invoke();
runspace.Close();
so , i changed the code below
RunspaceConfiguration rsConfig = RunspaceConfiguration.Create();
PSSnapInException snapInException = null;
PSSnapInInfo info = rsConfig.AddPSSnapIn("Microsoft.Exchange.Management.PowerShell.SnapIn", out snapInException);
Runspace myRunSpace = RunspaceFactory.CreateRunspace(rsConfig);
myRunSpace.Open();
Pipeline pipeLine = myRunSpace.CreatePipeline();
Command myCommand = new Command("Get-Mailbox -ResultSize Unlimited");
pipeLine.Commands.Add(myCommand);
Collection<PSObject> commandResults = pipeLine.Invoke();
i need Users list In C# , how can i achieve this ?
i am getting list in PowerShell , but i need it in C# code. 
Is Visual studio Compiled code  be 64 bit for running PowerShell scripts  ? 

Similar Messages

  • Getting problem while installing Snow Leopard (10.6.3) on my Mac Mini. The following issue is showing :  "mac os x snow leopard cannot be installed on this computer"  And My Mac Configuration details:  Model Name: Mac Mini Model Identifier: Macmini2,1

    Getting problem while installing Snow Leopard (10.6.3) on my Mac Mini. The following issue is showing : 
    "mac os x snow leopard cannot be installed on this computer" 
    And My Mac Configuration details:  Model Name: Mac Mini Model Identifier: Macmini2,1
    Intel Core 2 Duo
    1.83Ghz
    l2Cache: 2mb
    Memory : 2GB
    Bus Speed: 667MHz
    Please help me......
    Thanks

    Actually i have Mac OS X 10.5.4 DVD, I need to upgrade it to Snow Loepard(OS X 10.6)...
    Please suggest me what to do???
    Thanks

  • The photoshop library operation failed because quicktime is not installed on this computer

    I'm getting this when importing a Photoshop Timeline Animation into After Effects.
    "The photoshop library operation failed because quicktime is not installed on this computer"
    I have all updates to date.
    Any clues?

    After Effects CC (12.x) does not import animation/video layers in PSD files. You should render and export your animation from Photoshop as a movie file and import that into After Effects.

  • The printer driver is not installed on this computer....

    Ok, I have read all kings of fixes for this with HP printers, but what happens when its not just HP printers but any kind of printer I put on this Windows 7 32bit SP1 computer.  Every time I plug in a printer it installs the drivers but when I try
    to pull up the properties or even try to print it brings up this error.  This has happened on a Brother and a HP printer.
    Eric Vanderveer IT Consultant www.ericvanderveer.com

    Evidently you either did not install the correct driver or its installation did not successfully complete.  Can we get your system specs, what OS, What priinters ?  what you have already tried?  etc
    What troubleshooting have you done so far? 
    Please provide as many more details as you can.
    Before asking a technical question by e-mail, or on a website forum, do the following:
        Try to find an answer by searching the archives of the forum you plan to post to. (Microsoft Community)
        Try to find an answer by searching the Web
        Try to find an answer by reading the manual.
        Try to find an answer by reading a FAQ.
        Try to find an answer by inspection or experimentation.
    Suggestions for asking for help on a site.
    http://support.microsoft.com/kb/555375
    http://www.catb.org/~esr/faqs/smart-questions.html
    http://answers.microsoft.com/en-us/windows/forum/windows_other-windows_update/what-information-to-post-in-the-windows-update/1467f44b-ee27-4f7d-98d7-f1c4b35b3395
    More often than not when a device isnt working it is because the driver has become corrupted.  Re-installing a fresh copy should help
    http://windows.microsoft.com/en-us/windows7/Update-a-driver-for-hardware-that-isnt-working-properly?SignedIn=1
    http://captaindbg.com/how-to-update-drivers-on-windows-7/
    Wanikiya & Dyami -Team-ZigZag. www.ZigZag3143.com email [email protected]

  • Error when trying to install the iSCSI target - Cannot find the Windows PowerShell data file 'ImportExportIscsiTargetConfiguration.psd1'

    Hi,
    I'm just attempting to setup an iSCSI target on a freshly installed Windows 2012r2 box, but I get the following error when attempting to Create and iSCSI virtual disk via the wizard after a successful
    installation of the iSCSI target role.
    The full error is:
    Cannot find the Windows PowerShell data file 'ImportExportIscsiTargetConfiguration.psd1' in directory 'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\IscsiTarget\en-GB\', or in any parent culture.
    I tried to uninstall, then reinstall the role but no go.
    The Server Locale and UI was all updated to en-GB but this folder does not appear to exist in this location. Rather, the folder I can see is:
    'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\IscsiTarget\en-US\'
    I'm going to attempt to copy the 'en-US' folder to 'en-GB' to see what happens, but I would like to know why this has occurred in the first place? Other roles have installed (such as AD DS AD CS and
    IIS) on other machines with no issue.
    Many thanks
    Chris
    Chris

    Hi Chris,
    The error "Cannot find the Windows PowerShell data file 'ImportExportIscsiTargetConfiguration.psd1'" occured, because the file 'ImportExportIscsiTargetConfiguration.psd1' can't be loaded under the folder en-GB with current culture.
    I recommend you can copy this .psd1 file under  'C:\Windows\System32\WindowsPowerShell\v1.0\Modules\IscsiTarget'. Essentially if PowerShell can’t find the specified data file for the current culture it will “fallback” to the top-level data
    file in this case.
    For more detailed information, please refer to this article:
    Windows PowerShell 2.0 String Localization
    If there is anything else regarding this issue, please feel free to post back.
    Best Regards,
    Anna Wang
    TechNet Community Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Support, contact [email protected]

  • Windows Media Player cannot play the file because the required video codec is not installed on your computer

    I can not find solution to the issue "Windows Media Player cannot play the file because the required video codec is not installed on your computer" while attempting to play the file with *.wmv extension. Some computer fail in spite of said missing codec
    being present according the windrows media player in Windows 7 box

    If Rashid's link does not resolve it... consider the below:
    A)  As of this writing, the codec for GoToMeeting webinar recordings ("G2M4" codec) was only mentioned in *one* web page, of about 10 Microsoft web pages I read, to resolve this problem (and that codec is not included, yet, in their diagnostic tool),
    so if you're trying to play a GoToMeeting webinar, simply get the codec for it from their site:  http://www.GoToMeeting.com/codec
    B)  If Windows Media Player (WMP) will not even open the file, you won't be able to get the 4-character codec's name (like "G2M4") from WMP.  But VLC's media player will tell you that code, even when it fails to run the video.... and then you can
    search the internet for it. 
    C)  The problem sometimes is not actually a missing codec.  Other things that have helped others, some from: 
    http://answers.microsoft.com/en-us/windows/forum/windows_7-pictures/the-windows-media-player-12-could-not-play-the-wma/bb823460-44df-4e8d-ba2c-42ec0e111e5a?page=3
    (1) running the System File Checker (SFC.exe),
    (2) opening WMP first (running both the 32-bit and 64-bit versions) then opening the file from inside them,
    (3) confirming that WMP was the file association for WMV files,  
    (4) Control Panel -> Hardware and Sound -> Sound, selecting my audio device, and looking for a "5.1" setting (I didn't have one), to change to "stereo",
    (5) checking Tools\Options\Devices\Speakers\Properties\Speaker Properties\AdvancedPlayback\ Speakers /HP\Properties\Advanced\Default Format, to select "CD or DVD Quality" (if that setting appears for your device),
    Good luck,
    -- Doug
    Doug Ivison

  • HT5628 i was installing windows 8 on mac by boot camp and after i put the windows code and choose the partition i formatted the boot camp sector it said windows can not install on this sector because it is gpt

    i was installing windows 8 on mac by boot camp and after i put the windows code and choose the partition i formatted the boot camp sector it said windows can not install on this sector because it is gpt

    Reinstalling Mavericks depends on several factors:
    if you erased your recovery partition
    what OS originally came on your Mac.
    I'll assume you don't have a backup available that you made before your mishap,  because you didn't mention it.
    That's really the take home message here: have a backup!
    If you still have your recovery partition:
    boot into the recovery partition (command R at restart)
    use the recovery partition to reinstall Mavericks. see: OS X: About OS X Recovery
    if you do not still have your recovery partition, then it depends on whether your Mac originally came with installer disks or not.
    If it originally came with installer disks, you would boot from the installer disks, erase your HD, and then reinstall the OS that is on the installer disks, and then upgrade as necessary until you get to Mavericks.
    If your mac did not originally come with installer disks, but you managed to erase your recovery partition, then you can try to boot into internet recovery (option-command-R at restart), and use internet recovery to erase your HD and reinstall the OS that originally came with your computer, and then upgrade to Mavericks if you need to. See: Hands on with Mountain Lion's OS X Recovery and Internet Recovery | Macworld
             (the reference refers to ML but it applies just as well to Mavericks).

  • I am on Windows XP. Updated to latest iTunes but it would not install. Tried again and the system hung. I did a restart and iTunes had completely vanished from my system. Tried to do a new install but it won't finalise. Can anyone offer any suggestions?

    I am on Windows XP. Updated to latest iTunes but it would not install. Tried again and the system hung. I did a restart and iTunes had completely vanished from my system. Tried to do a new install but it won't finalise. Can anyone offer any suggestions?

    OK, lets do a complete overhaul to make sure it's working ok.
    First to check your Windows system file for any corruption:
    Go to command prompt (START/ALL PROGRAMS/ACCESSORIES right mouse click "command prompt" and choose "Run as Administrator"
    type in
    sfc /scannow
    let Windows fix any system files that need to be repaired.
    Restart the computer.
    Start iTunes and see if it is ok.
    If it doesn't, will have to go through the whole process of uninstalling and installing acccording to the following steps:
    1. Go to Microsoft website to fix install and Unistall problems. Click "Run now" from Fix it to remove all iTunes & related installer files:
    http://support.microsoft.com/mats/Program_Install_and_Uninstall
    Be aware that Windows Installer CleanUp Utility will not remove the actual program from your computer. However, it will remove the installation files so that you can start the installation, upgrade, or uninstall over.
    2. You should remove all instances of iTunes and the rest of the components listed below:
    it may be necessary to remove all traces of iTunes, QuickTime, and related software components from your computer before reinstalling iTunes.
    Use the Control Panel to uninstall iTunes and related software components in the following order:
    iTunes
    QuickTime
    Apple Software Update
    Apple Mobile Device Support
    Bonjour
    Apple Application Support (iTunes 9 or later)
    (Referenceinstructions from Apple article listed here: http://support.apple.com/kb/HT1923 to remove all components)
    3. Reboot your computer. Next, download iTunes from here:http://www.apple.com/itunes/download/ and install from scratch

  • TS1717 Having trouble running iTunes version 11.0.2 on a Dell Laptop running Windows 7 Professional Service Pack 1.  Keep getting an error message "the software required for communicating with iPods and mobile phones was not installed correctly..." reinst

    Having trouble when I launch iTunes (version 11.0.2) on my Dell Laptop running Windows 7 Professional (service pack 1).  I get an error message indicating software required to communicate with iPod and mobile phones was not installed correctly.  Do you want iTunes to try to repair this for you?  I normally respond with OK and it immediately tells me "could not be repaired.  Please reinstall iTunes..."  I have done this a number of times to no avail.

    I also notice Quicktime is not getting installed at all.
    That one is normal nowadays (ever since the iTunes versions 10.5.x).
    The software required for communicating with iPods and mobile phones was not installed correctly. Do you want iTunes to try to repair this for you?
    Let's try a standalone Apple Mobile Device Support install. It still might not install, but fingers crossed any error messages will give us a better idea of the underlying cause of why it's not installing under normal conditions.
    Download and save a copy of the iTunesSetup.exe (or iTunes64setup.exe) installer file to your hard drive:
    http://www.apple.com/itunes/download/
    Download and install the free trial version of WinRAR:
    http://www.rarlab.com/
    Right-click the iTunesSetup.exe (or iTunes64setup.exe), and select "Extract to iTunesSetup" (or "Extract to iTunes64Setup"). WinRAR will expand the contents of the file into a folder called "iTunesSetup" (or "iTunes64Setup").
    Go into the folder and doubleclick the AppleMobileDeviceSupport.msi (or AppleMobileDeviceSupport64.msi) to do a standalone AMDS install.
    (If it offers you the choice to remove or repair, choose "Remove", and if the uninstall goes through successfully, see if you can reinstall by doubleclicking the AppleMobileDeviceSupport.msi again.)
    Does it install (or uninstall and then reinstall) properly for you?
    If instead you get an error message during the install (or uninstall), let us know what it says. (Precise text, please.)

  • I have a MacBook 10.5.8 with Boot Camp. I can only operate the Windows side. When I move into MacOS it does not open.

    I have a MacBook 10.5.8 with Boot Camp. I can only operate the Windows side. When I move into MacOS it does not open.

    Your phrasing is not clear. How do you reboot into Mac OS? /can you describe the process step by step?
    Usually, you should do like this:
    - while in win, restart
    - immediately after chime, press option or alt key
    - wait for 2-3 seconds, you should see the boot options
    - select Mac OS partition
    If you have performed all these steps, and, after choosing Mac OS partition, you cannot boot into Mac OS, then your system is corrupt and should be reinstalled.

  • I am using a Seagate backup plus portable drive on my iMac 7 with OSX 10.9.2.  At startup up I always get a popup window stating "The disk you inserted is not readable by this computer.  I click ignore and everything seems OK. Is it?

    I am using a Seagate backup plus portable drive as my time machine backup on my iMac 7 with OSX 10.9.2 Mavericks.  At startup I always get popup window stating "The disk you inserted is not readable by this computer..?   I click ignore and everything seems to be OK.   Time machine seems to be backuping up to the seagate.   I can open time machine and see the history of backups.    Why does this message come up at startup of computer????

    If you installed the Seagate software, remove it according to the manufacturer's instructions.

  • I run Windows 8.1. I have received the result after several attempts uninstalling and reinstalling iTunes, "ITunes was not installed correctly. Please reinstall iTunes. Error 7 (Windows error 127)" What can I co?

    I run Windows 8.1. I have received the result after several attempts uninstalling and reinstalling iTunes, "ITunes was not installed correctly. Please reinstall iTunes. Error 7 (Windows error 127)" What can I do? to solve the problem.  Tried to clean the windows registry, no change.  Very frustrating.  Any advice is much appeciated.
    Thanks.

    Try the following user tip:
    Troubleshooting issues with iTunes for Windows updates

  • I sync the IPhone on windows 8 as always, suddenly ITunes message !Tunes could not connect to this IPhone . An unknow error occurred (OxE8000084).

    I sync the IPhone on windows 8 as always, suddenly ITunes message
    !Tunes could not connect to this IPhone . An unknow error occurred (OxE8000084).

    Read here:
    http://support.apple.com/kb/TS3221

  • HT201364 I have macbook pro 15", 2,6 ghz, 8gb, osx 10.9 but the pop up window says that maverics can not be installed on this computer. why is that? thank you

    I have macbook pro 15", 2,6 ghz, 8gb, osx 10.9 but the pop up window says that maverics can not be installed on this computer. why is that? thank you

    Check here >  OS X Mavericks: System Requirements

  • I have windows 7 64 bit, but i-tunes 10.5 will not install, an error keeps popping up. I could live without the update, but my i-phone is not recognized anymore

    I have windows 7 64 bit, but i-tunes 10.5 will not install, an error keeps popping up. I could live without the update, but my i-phone is not recognized anymore

    I've got the same problem and can't find a fix...

Maybe you are looking for

  • Ipod nano error message 13019

    Lately, when I sync my ipod nano I have been getting an error message of 13019. It won't let me sync anything to my ipod. I have tried to restore it and everything and it is still not working. Not sure what to do and could really use some help?

  • Upgraded to SP18 -program to run to generate alerts

    Hi    We recently upgraded our XI 3.0 dev environment from SP13 to SP18 - and our alert rules and categories that had been defined in SP13 are intact after the upgrade I know that beyond SP13 - Alert framework is not dependent on End-to-End monitorin

  • Address Book - Two Versions of Same Content

    I upgraded to Snow Leopard and set Exchange as my server for email, contacts, and appointments. Now, in contacts, there is one section of contacts in the category "on my mac" and another separate set of contacts in the category named for my Exchange

  • AE only starts on Admin account

    Hi, On my mac I have 2 accounts: an admin account and an other. Usually I work on the other. Since a week or two, my After Effects CC doesnt boot anymore on the other account but it still does on the admin... No error messages, just a spinning wheel.

  • Update  under apex_collection

    Hi gurus, Spent many fruitless time on this . It is time to call for help. Following is my process of creating, deleting, update member attributes plus my report query. My issue : updates( Ename) and deletion( a member) are working. BUT if deletion o