The requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered

Hi guys, I got a problem with SQL job and a package. The package is in a folder in the same server of my SQL instance. If I run the package everything is ok ( I am moving one file excel). If I run the package from SQL agent it returns "The
requested OLE DB provider Microsoft.ACE.OLEDB.12.0 is not registered". I looked into the previous post and they talk about 32 and 64 bit and that's ok, I fixed the package in 32 bit but what I am wondering is: why if I run the package manually it goes
and instead if I try to run with SQL agent it returns me that error?
Thanks 

Hi Vaibah, I already checked the "Use 32 bit" ( in SQL AGent). Is there something more to do in BIDS?
Q: Is there something more to do in BIDS?
--> We only have Project/Properties - Run64bitrunTime setting inside BIDS. No extra settings for 32/64 bits in BIDS
Q: why if I run the package manually it goes and instead if I try to run with SQL agent it returns me that error?
--> When you run from SQL Agent, it runs on 64 bit and so it fails.
You must read this:
http://toddmcdermid.blogspot.in/2009/10/quick-reference-ssis-in-32-and-64-bits.html
-Vaibhav Chaudhari

Similar Messages

  • The OLE DB provider "Microsoft.ACE.OLEDB.15.0" has not been registered.

    Similar to another post, I was trying to run this query in SQL Server Management Studio 2008 R2 (64 Bit) running on Surface Pro3 Windows 8.1
    SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.15.0','Excel 15.0;Database=C:\Users\File.xlsx', 'SELECT * FROM [Sheet1$]');
    I got this Error:
    Msg 7403, Level 16, State 1, Line 2
    The OLE DB provider "Microsoft.ACE.OLEDB.15.0" has not been registered.
    I realised I had 32 bit version of MS office 365 2013 installed, so un installed and re installed 64 bit and I get the same error.
    How can I resolve this error or what should I check next? Thank you.

    Hi Dixone,
    In addtion to Olaf's, the below links can help to shoot the troubles when loading excel using T-SQL.
    SQL Server – Import Data from Excel using T-SQL
    Questions About Using TSQL to Import Excel Data
    If you have any question, feel free to let me know.
    Eric Zhang
    TechNet Community Support

  • Tabular: Import from text file error : The provider 'Microsoft.ACE.OLEDB.12.0' is not registered.

    I'm trying to import a text file into a tabular model in SSDT
    windows7 64 bit
    I have office 2013 32bit installed. Will not uninstall this as I need it.
    How do I import a csv file into the tabular model?
    i've downloaded both 32 and 64 bit access redistributables from here: http://www.microsoft.com/en-au/download/details.aspx?id=39358
    64 bit refuses to install (already have 32bit office tools installed)
    32 doesn't stop the error - i'd assume i'd already have the correct 32 bit drivers installed since i have the full office 2013 suite installed.
    I've looked at some of the other topics around and they are either unanswered or the poster didn't have office installed so could install 64bit redist
    Thanks
    Jakub @ Adelaide, Australia Blog

    see if this helps
    http://visakhm.blogspot.in/2011/11/excel-2010-export-import-issue-in-64.html
    Please Mark This As Answer if it solved your issue
    Please Mark This As Helpful if it helps to solve your issue
    Visakh
    My MSDN Page
    My Personal Blog
    My Facebook Page

  • OLE DB provider "Microsoft.ACE.OLEDB.15.0" for linked server "(null)" does not support the required transaction interface

    Hi All,
    I am trying to execute a stored procedure and store its result in an excel.
    My query to execute stored proc and store sresults in excel
    INSERT INTO
    openrowset('Microsoft.ACE.OLEDB.15.0',
    'Excel 8.0;Database=C:\TC\DataAnalysisFiles\DataAnalysisResult.xls;OLE DB Services=-4','select * from [Sheet1$]')
    EXEC UspUnitTest_Test_CheckDuplicateModelNumberSerialNumber
    I am getting error
    The requested operation could not be performed because OLE DB provider "Microsoft.ACE.OLEDB.15.0" for linked server "(null)" does not support the required transaction interface.
    I have enabled below things by running scripts
    sp_configure 'show advanced options', 1;
    GO
    RECONFIGURE;
    GO
    sp_configure 'Ad Hoc Distributed Queries', 1;
    GO
    RECONFIGURE;
    GO
    EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.15.0', N'AllowInProcess', 1
     GO
     EXEC master.dbo.sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.15.0', N'DynamicParameters', 1
     GO
    Please help and let me know if this can be resolved
    Supriya Thigale

    because OLE DB provider "Microsoft.ACE.OLEDB.15.0" for linked server "(null)" does not support the
    required transaction interface.
    Hello,
    When you insert data from SQL Server into a linked server, then a distributed transaction should be started and here it seems this fails.
    See
    Distributed Transactions (Database Engine) for more Details +
    Distributed Queries
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "Excel_Test"

    Here,
    I have created a Linked Server Called Excel_Test And its working fine ( For Retrieving data from excel to Sql Server Database Table ) ...
    I have written a Stored Procedure for inserting data , When i Execute that stored procedure it is inserting data to Table Which i have
    given.
    And the data which is in table should be shown in the application,
    But, Am getting the following error.
    Cannot
    initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "Excel_Test".
     Please help me on this.
     Thanks in Advance....

    Even am able to retrieve the data from Sql Server management studio.
    The same retrieved data should be shown in the application (Dashbord).
    Query : Select * from OpenQuery(Excel_Test,'Select * from [Sheet1$]')
    Am getting the output excatly the data in the excel sheet.
    But when am opening that application where the above data should be shown am getting the below error.
    Cannot
    initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "Excel_Test".
     Is this error is because of problem in Dot Net Coding or in the linked server.
    Thanks in Advance.....

  • Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "database name".

    I have an application which has linked servers to mdb databases on Sql Server. Development machines which have access to full version of Office can intialise the data source as expected, however, machines using the Office 2010 runtime throw the above exception.
    Have checked the HKEY_CLASSES_ROOT\Microsoft.ACE.OleDb.12.0\CLSID which has value {3BE7860-0366-4F5C-9434-25CF162E475E} as expected, however that CLSID cannot be found in HKEY_CLASSES_ROOT\CLSID on the machines using the runtime.
    How can I ensure PCs using the 2010 runtime can access the linked server(s).

    To add a login, execute this procedure:
    sp_addlinkedsrvlogin
    See some examples here:
    http://msdn.microsoft.com/en-us/library/ms189811.aspx

  • Cannot create an instance of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"

    Windows Server 2008
    SQL Express 2012
    Tried opening a .csv and a .xls file, without success. File is located on the local server and not somewhere else.
    I know, I know, the forums are full of this error message. But sometimes when you follow all of the rules, stuff still happens, or in this case Doesn't happen.
    I installed the proper ACE drivers (64 bit) and reconfigured SQL Server to allow Ad Hoc Queries. Hell I even rebooted the server after the install.
    I have successfully installed these drivers on several machines (work stations and servers), and all have worked just fine. So, I am at a loss as to why it won't work on this system. I might have forgotten some obscure setting, but I don't think so.
    Ted

    Registry fix was also tried?
    EXEC sp_MSSet_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'AllowInProcess', 1
    GO
    EXEC sp_MSSet_oledb_prop N'Microsoft.ACE.OLEDB.12.0', N'DynamicParameters', 1
    GO

  • OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)" returned message "Unspecified error".

    I am trying to execute this Select against my excel file
    SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0; HDR=NO; IMEX=1; Database=C:\Temp\test.xlsx', 'SELECT * FROM [Sheet1$]')
    I have followed every single step according to this article here
    http://visakhm.blogspot.ca/2013/12/how-to-solve-microsoftaceoledb120-error.html
    but still getting the same error as metioned in the title. Can anyone suggest what else could be wrong?
    The environment is SQL 2005 64 bit with Office 64 Bit drivers (Access 64 bit engine installed)

    I am trying to execute this Select against my excel file
    SELECT * FROM OPENROWSET('Microsoft.ACE.OLEDB.12.0', 'Excel 12.0; HDR=NO; IMEX=1; Database=C:\Temp\test.xlsx', 'SELECT * FROM [Sheet1$]')
    I have followed every single step according to this article here
    http://visakhm.blogspot.ca/2013/12/how-to-solve-microsoftaceoledb120-error.html
    but still getting the same error as metioned in the title. Can anyone suggest what else could be wrong?
    The environment is SQL 2005 64 bit with Office 64 Bit drivers (Access 64 bit engine installed)
    Hi ,
    I think this help u little to run excel file in ssis.In instal  Access bit not work well on ssis any version.you need to change debugging 1 option from  true to false.
    This is the step for change it:
    1. Right click on your project then go to properties.
    2.then go to debugging.
    3.Then there is a option debug.go there and change "Run64bitRuntime"  true to false.
    I think your problem solve.
    Told me if u not understand anything my English so bad
    Thanks
    Muzahid.

  • The requested OLE DB provider SQLNCLI10.1 is not registered. If the 64-bit driver is not installed, run the package in 32-bit mode.

    Locally I have 32 bit windows and the server is 64 bit. When I try to change the provider locally to SQLNCLI11.1, the connection test succeeds but when I close the package and reopen it the provider is set to 10.1 again. Do I need to install a driver locally
    to get the 11.1 version to work, or is this not the issue with the error message?
    Thanks

    Have you set the Run64BitRunTime configuration property?
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.
    I don't see that property. Is it on the connection?

  • Microsoft.ACE.OLEDB.12.0 in Windows 8.1

    This powershell script worked in Windows 8.0
    $objConnection = New-Object -com "ADODB.Connection"
    $objRecordSet = New-Object -com "ADODB.Recordset"
    $objConnection.Open("Provider=Microsoft.ACE.OLEDB.12.0; Data Source = " + $dbFilePath)
    I just upgraded to Windows 8.1 and now I get this exception when running the open(
    Exception calling "Open" with "1" argument(s): "Provider cannot be found. It may not be
    properly installed."
    At line:1 char:1
    + $objConnection.Open("Provider='Microsoft.ACE.OLEDB.12.0'; Data Source = " + $dbF ...
    Is there a new provider I should be using? Thanks so much,
    John Blackman

    Hi
    I'm using SQL Server 2012, and still get the error message: Cannot initialize the data source object of OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "(null)"
    It started after upgrading to Windows 8.1.  Before that everything worked smoothly. I heard that one can't downgrade back from Win8.1... so what should I do?
    Before posting here, I already tried the solutions of:
    SP_CONFIGURE 'XP_CMDSHELL',1   GO             
    RECONFIGURE
    USE [master]  
    EXEC master . dbo. sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'AllowInProcess' , 1
    GO
    EXEC master . dbo. sp_MSset_oledb_prop N'Microsoft.ACE.OLEDB.12.0' , N'DynamicParameters' , 1
    GO
    sp_configure 'show advanced options', 1
    GO
    RECONFIGURE
    GO
    sp_configure 'Ad Hoc Distributed Queries', 1
    GO
    RECONFIGURE
    Still stuck with this error, what do I do?  Please help.... Thank you

  • Microsoft Jet OLEDB 4.0 STILL not working on 64-Bit?

    I've seen all the posts (hundreds of them) concerning the fact that the Microsoft Jet OLEDB 4.0 provider only works on 32-Bit systems.  Really?  I'm running Windows Server 2008 Data Center and have an urgent need to run an SQL Job that needs to query an Access database.  The job runs DTExec to execute an SSIS package (the Job step is configured with the "Use 32 bit runtime" checked (set to true)).  I am getting the follwing error message when I'm on the part of the SSIS package, which is an 'Execute SQL Task', which attempts to open the Access Database: 
    DTExec: The package execution returned DTSER_FAILURE (1).
    Started:  2:31:08 PM
    Finished: 2:31:12 PM
    Elapsed:  4.438 seconds
    Microsoft (R) SQL Server Execute Package Utility
    Version 10.0.1787.0 for 32-bit
    Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
    Started:  2:37:14 PM
    Error: 2009-04-30 14:37:19.13
       Code: 0xC002F210
       Source: DoDeletes Execute SQL Task
       Description: Executing the query "DELETE From [dbo].[zsong] where [MUZENBR] in (
    SE..." failed with the following error: "The OLE DB provider "Microsoft.Jet.OLEDB.4.0" has not been registered.". Possible failure reasons: Problems with the query, "ResultSet" property not set correctly, parameters not set correctly, or connection not established correctly.
    End Error
    DTExec: The package execution returned DTSER_FAILURE (1).
    Started:  2:37:14 PM
    Finished: 2:37:19 PM
    Elapsed:  4.422 seconds
    I find it highly ridiculous that Microsoft would not care to release a 64-bit driver for Jet OleDb 4.0.  There is obviously a need, judging by the hundreds of posts out there with people asking about this.
    Or am I missing something?  Is there a driver that I just can't find?
    Thanks.

    The Jet OLEDB provider consists of several dlls. You can check if these dlls are installed.
    For x64 machines, the 32-bit folder where I expect they live is C:\Windows\Syswow64 or C:\Winnt\Syswow64
    This list (taken from http://support.microsoft.com/kb/278604) seems to cover the Jet dlls:
    Microsoft Jet 4.0 OLE DB Provider
    Provider=Microsoft.Jet.OLEDB.4.0
    C:\WINNT\System32\Msjetoledb40.dll
    C:\WINNT\System32\Msjet40.dll
    C:\WINNT\System32\Mswstr10.dll
    C:\WINNT\System32\Msjter40.dll
    C:\WINNT\System32\Msjint40.dll
    This article tells how to see if Jet is installed, and which version is installed, and how to get the latest service pack 8 http://support.microsoft.com/kb/239114/
    However, that kb 239114 it says "For computers that are running Windows Server 2008"
    If you are running Windows Server 2008, you have a later version of Jet 4.0 than the version that is included with Jet 4.0 SP8.
    If you don't find Jet is installed correctly, I am not totally sure what to do - sounds like Windows is not installed completely, or the feature was not enabled in the add/remove windows components.
    Indeed Jet is only 32-bit as Todd mentioned http://support.microsoft.com/kb/957570
    Since Jet is included with the OS I expect the install to have been done by one of the *.inf files in the C:\Windows\inf. I found several inf files on my Win 7 machine (not a good comparison for you) which cover these dlls such as (syssetup.inf, layout.inf, oem33.inf). I know it is possible to right click and run the install on these .inf files, but since its a windows component, it would be reinstalling windows components too, which I would recommend against on a production server, escpecially a datacenter edition! Must be a high end production server, so I can't recommend you do that because I'm afraid it would break something else because I haven't tested it before.
    Let us know if you find the dlls or not.
    Best wishes, JasonHDidn't get enough help here? Submit a case with the Microsoft Customer Support team for deeper investigation - http://support.microsoft.com/select/default.aspx?target=assistance

  • Step by Step Instructions of loading Excel into SSIS via OLE Data Source Microsoft.ACE instead of Excel connection manager

    Hi,
    I have a very large Excel workbook which I need to load into SSIS. Using the default Excel connection manager SSIS seems to load the entire work sheet into memory before performing any operation even after setting IMEX=1 within the connection string.
    Can anyone provide me with step by step instructions on how to use  OLE Data Source Microsoft.ACE please?
    I've found the link; -
    https://www.connectionstrings.com/ace-oledb-12-0/
    Which looks very useful.
    Since I currently have Excel 2010 as my data source I tried; -
    Data Source=C:\PoC\POC_Data_Source\my.xlsx;Provider=Microsoft.ACE.OLEDB.12.0;Extended Properties="Excel 12.0 Xml;HDR=YES ;IMEX=1";
    The connection test successfully. However SSIS still seems to be loading the entire work sheet into memory before starting the data load.
    Kind Regards,
    Kieran.
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

    Thanks again Koen,
    I am developing remotely on a development server. So when I run SSDT I am running it within the development server box. My current technology / environment mix means I can't run SSDT from my local desktop.
    I am pretty sure that scanning of the rows is an issue causing performance, e.g. if I just click on the data source component SSDT freezes for several minutes, unless I just have a cut down version of the Excel file, say first 5,000 rows, then the response
    of SSDT is acceptable.
    Also when I have SSDT pointing to the full spreadsheet and I click around in the associated Data Flow I notice devenv.exe* 32 slowing grabbing 4gb of RAM and releasing it according to Windows Task Manager. 
    Kind Regards,
    Kieran.
    Kieran Patrick Wood http://www.innovativebusinessintelligence.com http://uk.linkedin.com/in/kieranpatrickwood http://kieranwood.wordpress.com/

  • The 'Microsoft.ACE.OLEDB.12.0' provider is not registered on the local machine (Windows Server 2008 R2 (64) vs MS Office 2007)

    We just have switched our local server from 32-bit to 64-bit machine and now we have Windows Server 2008 R2 Service
    Pack 1 with MS Office 2007. On server we are running an application in ASP.Net 3.5 using visual studio
    2008. All users have 32-bit windows 7 and MS Office 2007.
    when user tries to import data from Excel to Database (SQL Server 2005), error comes as
    "microsoft.ace.oledb.12.0 provider is not registered on local machine".
    I have tried a solution by installing Access Database Engine 2007 Office System Driver on the Server, but the error
    was same. Now what should I do to resolve this problem??? Should we install Office 2010 64-bit on the Server or is there any other solution???

    Hi,
    Thanks for your posting.
    the file can be made in excel 2007, try to install:2007 Office System Driver: Data Connectivity Components
    http://www.microsoft.com/en-us/download/details.aspx?id=23734
    Regards.
    Vivian Wang
    TechNet Community Support

  • Native error code -214721788​7 0x80040e21 Microsoft OLE DB Provider for ODBC Drivers: ODBC driver does not support the requested properties​.

    I configured MySQL in TestStand and making a query in TestStand like this:
    Command :=> "SELECT *  FROM crc_table ; " or  "SELECT CRC_Value  FROM crc_table ; " returns the total number of records without any errors.
    But when I add the "where" clause
    "SELECT crc_table.CRC_Value  FROM crc_table where crc_table.File_ID= Locals.File_ID and crc_table.Version_ID = Locals.Version_ID and crc_table.Link_ID = Locals.Link_ID; "
    I get the error as:
    Error, The following SQL command failed: 'SELECT crc_table.CRC_Value FROM crc_table where crc_table.File_ID= Locals.File_ID and crc_table.Version_ID = Locals.Version_ID and crc_table.Link_ID = Locals.Link_ID; ...' Native error code -2147217887 0x80040e21 Microsoft OLE DB Provider for ODBC Drivers: ODBC driver does not support the requested properties. [Error Code: -10, User-defined error code.]
    I tried the same syntax in MySQL Query Browser and got the correct result:
    SELECT crc_table.CRC_Value  FROM crc_table where crc_table.File_ID= "FID1" and crc_table.Version_ID = "VID1" and crc_table.Link_ID = "L1";
    I would appreciate your help.
    Thank you,
    Vidula

    Vidula,
    I am not completely sure if this is the cause of the error but it is something that will cause problems if it is not fixed.  In your SQL statement you must properly concatenate your strings with your variables.  In the statement you posted you were simply putting the variable names in the string, not actually pulling their values.  To do so properly your query should look something like this:
    "SELECT crc_table.CRC_Value  FROM crc_table where crc_table.File_ID='"+Locals.File_ID+"' and crc_table.Version_ID = '"+ Locals.Version_ID+"' and crc_table.Link_ID = '"+Locals.Link_ID+"' ;"
    This way we are using the values of the variables in conjunction with the text strings.  In this case the usage of single quotes (') casts the variables as strings so you may need to change this character sequence, but from the second example you gave I think that your variables are of type string so this should work fine.
    Message Edited by herosphro on 04-01-2008 03:52 PM
    John B.
    Applications Engineer
    National Instruments

  • 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  ? 

Maybe you are looking for