- Get Wmiobject Rpc Unavailable 0x80070…
- Get Hotfix The Rpc Server Is Unavailable
- Powershell Rpc Server Is Unavailable
This exception
is received in my Windows Service when I run it on any machine, but when I test it in a test application no exception is thrown. In my code what I am doing is converting two .DAT files into .xls files. When I start the service through services.msc and run the service it runs fine for some time, but after updating certain rows it throws the exception and then nothing happens after that. I have got two separate functions that does the work separately. The sample code is:
This is the function where the work is done.Any help would be greatly appreciable.My Writestuff() Method is catching the following Exception:
Also if I get rid of the clear methods in my code and the
Another exception comes in my way:
I am really not sure what the hell is hapenning.
Sumit Roy
Sumit RoySumit Roy15111 gold badge44 silver badges1818 bronze badges
2 Answers
Try to following the second configuration method explained in this article
D4rkTigerD4rkTiger
While the article states that Office 2003 support has ended, the contents are still valid today: Microsoft does not support server-side automation of Office. Even in client-side automation Office interop is pretty quirky.
You're best off with a library such as Aspose or NPOI.
ToolmakerToolmaker
Not the answer you're looking for? Browse other questions tagged c#.netexcelservicerpc or ask your own question.
Posted by5 years ago
Archived
So I have to do a big broad discovery for a consultant. I need to get some hardware stats - disk space, make/model, etc. - and it looks like I can use get-wmiobject to do so. (I'm open to other methods, so long as I can gather total disk space, used disk space, etc.)
I was able to use get-adcomputer to get a list of all computer objects in AD, and I've got the list of hostnames in a CSV. I imported it to an array as follows:
Whenever I run the command below in Powershell with Active Directory module (logged on as a domain admin on a domain controller, launching Powershell as administrator): get-wmiobject win32_logicaldisk -computer $computers
I get a bunch of the following: Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) At line:1 char:14 + get-wmiobject <<<<win32_logicaldisk -computer $computers
- CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
If I try to use test-connection -computer $computers I get nothing but errors that a non-recoverable error has occurred during database lookup. I can use test-connection on an individual machine just fine. I can ping any computer in $computers and get a response.
Our environment has Windows Firewall off for all connections via group policy, and we don't filter or firewall any internal traffic. I used Lansweeper Connectiontester to test connections, and it shows port 135 as open and WMI access tests OK to any computers I use.
I am running all this from one of our domain controllers.
I kinda not want to go back to the start after playing for 24 hours in game time already. So try it anyway, theres no downside. I think it does.I believe the first time i used skip the fade mod, i was already playing, because i remembered it and thought 'damn i rly don't want to do fade again, with all the mazes n stuff', so i installed it and it has worked ever since.If it works, you should still have to do the start of it, with duncan, and then from there, if i remember correctly, it skips you all the way to the last demon fight, you gain all the attributes and everything that you would otherwise have to run around finding.Worst case scenario, you install mod and still have the fade. Skip the fade mod.
I can rpcping other machines without issue from the domain controller I'm using for this.
It looks like for whatever reason, individual RPC queries succeed while those in bulk fail.
Anyone know what else I should be trying?
8 comments
Running
Get-WmiObject Win32_ComputerSystem -ComputerName 'MyCnameRecord'
gives error: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
.However running
Get-WmiObject Win32_ComputerSystem -ComputerName 'ServerNameToWhichTheAboveCnameRefers'
all works. How to download cities skylines.Equally
Get-WmiObject Win32_ComputerSystem -ComputerName 'IPOfServerWhichCnameAlsoCorrectlyResolvesTo'
works. Is anyone aware of some configuration / security setting which may be required to allow RPC calls to a server via a CNAME record? I'd assumed that as the IP is correctly resolving, and this works by IP, it should work by cname record; however clearly it doesn't.
Background
We recently migrated our SQL Servers from a physical cluster to a stand-alone VM. We'd used a DNS alias for the cluster, which we kept after migrating to the VM in order to minimise reconfiguration (i.e. we use this approach: https://www.mssqltips.com/sqlservertip/2663/using-friendly-names-for-sql-servers-via-dns/).
After this migration, some of our monitoring software began giving errors when attempting to query the database server's performance. It was accessing the database server via the DNS alias, rather than by the server name (this had worked previously for the cluster; though no longer worked when using the DNS CNAME record).
The PowerShell code above is just a simplified way to demonstrate the underlying issue.
JohnLBevanJohnLBevan55866 gold badges1111 silver badges3535 bronze badges
2 Answers
Have you looked at OptionalNames and DisableStrictNameChecking in the LanmanServer parameters? Depending on your Windows version these may be the issue.
This has worked with shares & printing for me in the past so should (could) work for other Win32 RPC stuff.
TheFiddlerWinsTheFiddlerWins2,82511 gold badge88 silver badges2121 bronze badges
What TheFiddlerWins describes is a very likely culprit. I dealt with a similar issue a couple months ago, see WMI queries can't run with a FQDN?.
Community♦
Tim BrighamTim Brigham13.6k77 gold badges5252 silver badges100100 bronze badges
Not the answer you're looking for? Browse other questions tagged domain-name-systemcname-recordrpc or ask your own question.
I have multiple windows 7 Pro and Ultimate machines on my domain. I receiving the following Error Message when running Get-WmiObject cmdlet on couple of the Remote Machines.Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)
At line:1 char:1
+ Get-WmiObject win32_bios -ComputerName remotecomputername|Select PSComputerName,Manufact ..
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException
+ FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
I checked that the 'Windows Management Instrumentation (WMI-In)' rule is enabled in the firewall for each remote machine. The DCOM component is also enable.
The following services are also running:
Get Wmiobject Rpc Unavailable 0x80070…
Get Hotfix The Rpc Server Is Unavailable
Remote Access Auto Connection ManagerRemote Access Connection Manager
Remote Procedure Call (RPC)
Powershell Rpc Server Is Unavailable
Remote Procedure Call (RPC) LocatorRemote Registry