Windows error 0x800706BA, -2147023174

Detailed Error Information

HRESULT analysis[1]

FlagsSeverityFailure
Reserved (R)false
OriginMicrosoft
NTSTATUSfalse
Reserved (X)false
FacilityCode7 (0x007)
NameFACILITY_WIN32[1][2]
DescriptionThis region is reserved to map undecorated error codes into HRESULTs.[1][2]
Error Code1722 (0x06ba)

This is a Win32 error which has been mapped into an HRESULT. More information may be available in error 0x000006ba.

Questions

66votes
7answers

Try/catch does not seem to have an effect

I am new to powershell, and I am trying to add error handling via try/catch statements, but they don't seem to actually be catching the error. This is powershell v2 CP3. $objComputer = $objResult.Properties; $strComputerName = $objComputer.name write-host "Checking machine: " $strComputerName try { $colItems = get-wmiobject -class "Win32_PhysicalMemory" -namespace [...] read more
powershell
38votes
15answers

Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

When I run Get-WmiObject win32_SystemEnclosure -Computer hostname | select serialnumber it works for both local and remote hosts. When I do this for a list of hosts using ForEach ($_ in gc u:\pub\list.txt) { Get-WmiObject win32_SystemEnclosure -Computer $_ | select serialnumber | format-table -auto @{Label="Hostname"; Expression={$_}}, @{Label="Service Tag"; Expression={$_.serialnumber}} } [...] read more
powershell
14votes
3answers

WMI: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) throws when try to connect to remote machine

I'm using the following code to connect to remote machine using WMI: ConnectionOptions connOptions = new ConnectionOptions(); connOptions.Impersonation = ImpersonationLevel.Impersonate; connOptions.EnablePrivileges = true; connOptions.Username = "admin"; connOptions.Password = "password"; ManagementScope scope = new ManagementScope(String.Format(@"\\{0}\ROOT\CIMV2", remoteMachine), connOptions); scope.Connect(); I'm getting the following exception: The RPC server is unavailable. (Exception from HRESULT: [...] read more
c#
.net
wmi
12votes
5answers

"The RPC server is unavailable" using WMI query

I have a workgroup of web servers running Server 2008 R2 in which I'm trying to manage a script that checks the disk space of all of them. I had set this up a few months ago when the servers were being set up and I believe it was working [...] read more
c#
asp.net
wmi
rpc
wmi-query
9votes
9answers

Remote WMI connection

I want to connect to remote PC running Windows 7, from another PC using ManagementScope on a local network. On remote PC I've created a new user account "Samuel" without password and set as administrator. ConnectionOptions options = new ConnectionOptions(); options.Username = "Samuel"; options.Password = ""; ManagementScope scope = new [...] read more
c#
wmi
8votes
4answers

Windows 2016: Docker container error

I'm using docker on Windows server 2016, I have created a container using the "microsoft/windowsservercore:latest" image. On this image i have installed "Print-Server" role but when I try to call "Get-Printer" cmdlet I obtain an error with the spooler service. These are the commands used to recreate the problem: docker [...] read more
windows
docker
windows-server-2016
8votes
4answers

The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

Occasionally I get this error when working on remote computers. It's hit or miss on which computer I get it on. But I am able to ping the computer and test-connection pans out. For example, the computer I got this error on today I was able to get to yesterday. [...] read more
networking
powershell
8votes
7answers

Catch Exception with Condition

Note: I am very happy to tell you that exception filters are now in the C# 6.0 language. This is a thought experiment, I'm interested in your opinion: Does it make sense to you? Do you know whether something similar has already been proposed for the C# programming language? I [...] read more
c#
exception
syntax
7votes
1answer

Windows Server 2012 member server reports - there is a time or date difference between your computer and the remote computer

PROBLEM Domain member service reports the following when attempting to RDP from any Windows 10 workstation on the same domain or any Windows client from an external source: * > Remote Desktop cannot verify the identity of the remote computer because there is a time or date difference between your [...] read more
windows-server-2012-r2
domain
rdp
internal-dns
rpc
7votes
2answers

BUG: Word 2013 VSTO Cannot Handle Image in Header Formatted Behind or In Front of Text

I am cross-posting this question from Microsoft Community because I haven't gotten any response there, and maybe someone here can shed some light on this. I have noticed an issue that is specific to Word 2013 when using VSTO to process a document. The document contains an image in the [...] read more
c#
ms-word
vsto
com-interop
word-2013
7votes
1answer

Azure Diagnostics not working in my Worker Role

I'm trying to get trace logs for my worker role in windows azure but it's not working and cannot see any error. I've configured my application to use azure diagnostics as explained here: https://www.windowsazure.com/en-us/develop/net/common-tasks/diagnostics/ First, I have this in the app.config of my worker role: <system.diagnostics> <trace> <listeners> <add type="Microsoft.WindowsAzure.Diagnostics.DiagnosticMonitorTraceListener, [...] read more
azure
azure-worker-roles
diagnostics
azure-diagnostics
7votes
2answers

System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

This exception System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) 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 [...] read more
c#
.net
excel
service
rpc
6votes
1answer

Unable to cast COM object to interface type 'WUApiLib.UpdateSession c#

I am using WUApiLib.dll, and writing a program to detect which updates can be downloaded and installed. Type t = Type.GetTypeFromProgID("Microsoft.Update.Session", "10.81.4.213"); UpdateSession session = (UpdateSession)Activator.CreateInstance(t); ISearchResult SearchResults = UpdateSearchResult.Search("IsInstalled=0"); foreach (IUpdate x in SearchResults.Updates) { Console.WriteLine(x.Title); } most of the time it works perfectly, but in some cases I [...] read more
c#
.net
casting
wuapi
5votes
1answer

New Domain Controller Cannot Enroll for KerberosAuthentication Certificate

I have an AD domain. 2003 FFL/DFL. The schema was upgraded to version 56 for Server 2012. The domain contains a mix of domain controllers from Server 2003, Server 2008, Server 2008 R2, and now Server 2012. I have an Enterprise Issuing Certificate Authority running 2008 R2. On the Server [...] read more
active-directory
windows
ad-certificate-services
5votes
2answers

WMI The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

My application requirement is like below. Application will run on domain admin system which will ping all machine under that domain, it will take disk drive, CPU and RAM details from all domain systems. Whenever I'm trying to ping machine I'm getting error that > "The RPC server is unavailable. [...] read more
c#
wmi
rpc
remote-access
windows-applications
4votes
1answer

How to catch Exceptions with PowerShell

I am getting this error. Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) At F:\Code\powershell\network_shutdown\TurnNetworkOff.ps1:19 char:26 + Get-WmiObject <<<< -computername $computer Win32_NetworkAdapter -filter "AdapterTypeId =0" | % { + CategoryInfo : InvalidOperation: (:) [Get-WmiObject], COMException + FullyQualifiedErrorId : GetWMICOMException,Microsoft.PowerShell.Commands.GetWmiObjectCommand Here is my code #Define variables used in [...] read more
powershell
logging
4votes
1answer

The RPC server is unavailable from .NET over AWS

I am trying to access EC2 machines remotely to get some info using C#. I wrote code as below:- ConnectionOptions options = new ConnectionOptions { Username = serverspace.ServerIP + @"\xxxxxx", Password = "xxxxxxx", Impersonation = ImpersonationLevel.Impersonate, EnablePrivileges = true }; ManagementScope scope = new ManagementScope(String.Format(@"\\{0}\ROOT\CIMV2", serverspace.ServerIP), options); scope.Connect(); But an [...] read more
amazon-ec2
wmi
windows
3votes
1answer

Get computername by username

I am trying to find a computername that is used by certain user. To do it I get a list of computers by Get-ADComputer and then ask all of them if there is a user I am looking for logged on. This is my script: $pcs = Get-ADComputer -filter {name [...] read more
powershell
3votes
3answers

Adding remote machine to AD via Powershell

So I have a powershell script, Add-Computer -ComputerName $computername -LocalCredential $computername\admin -DomainName $domain -Credential domain\$username -Force -Restart So if I have a machine that has either fallen off the domain or is disabled, and I run the following command, I get an error: Remove-Computer : Cannot establish the WMI connection [...] read more
windows
active-directory
domain
powershell
3votes
4answers

The rpc server is unavailable (exception from hresult : 0X800706BA)

My application scan through the excel files and generate a report having count of Activex controls in each excel file. But while running the tool from client machine we are getting an error on opening the file (for some file not all) and the files are located in the sever [...] read more
vb.net
excel
3votes
3answers

Try/Catch or If/Else?

Hello Guys im having trouble trying to figure out how to make this script to work, im very new on scripting but i do understand most of it but still figuring out some things. try { Test-Connection -Computername $_ -count 1 -ErrorAction Stop } catch { $_.Exception.ErrorCode -eq 0x800706ba } [...] read more
powershell
if-statement
try-catch
credentials
2votes
1answer

Change certificate auto enrollment settings from long gone CA to new CA

We started getting event ID 13 from a our domain controllers: > Certificate enrollment for Local system failed to enroll for a DomainController certificate with request ID N/A from OLDSERVER.domain.local\oldserver (The RPC server is unavailable. 0x800706ba (WIN32: 1722)). OLDSERVER was a 2003 domain controller and certificate services server that was [...] read more
windows
certificate-authority
2votes
0answers

RPC Server unavailable. 0x800706BA

I've alsready seen some similar threads on the RPC server unavailable messages; HRESULT: 0x800706BA. I've read some and looked at the recommendations on this thread; WMI query between two different AD sites? While there were some helpful hints it doesnt quite fit my questions... I'm using an endpoint security platform [...] read more
windows-server-2008
domain-name-system
wmi
rpc
endpoint
2votes
1answer

How do I connect to a remote VisualSVN server?

I am trying to use VisualSVN and PhpStorm to connect to a remote VisualSVN Server. I have the IP address to the machine, and I have specified the path to the machine in both programs. The paths I have tried: svn://ip.ad.dr.ess/c:/Repositories svn+ssh://ip.ad.dr.ess/c:/Repositories In Visual SVN, I receive Cannot connect to [...] read more
svn
phpstorm
remote-server
visualsvn-server
visualsvn
2votes
1answer

Azure webroles recycle after configuration change despite handling the RoleEnvironment.Changing event and setting Cancel to false

When changing some of the configuration settings of a webrole, the RoleEnvironment.Changing event is triggered. As far as I understand it, if Cancel is set to false in the RoleEnvironmentChangingEventArgs, the role should not recycle and the changes are just accepted and should be applied as soon as the RoleEnvironment.Changed [...] read more
azure
azure-web-roles
2votes
3answers

Office automation (Interop) on Windows Server 2012

I'm successfully using Office automation on Windows Server 2008 R2 with Office 2007 in order to convert Office documents to PDFs. The code is rather simple: public class WordConvert { /// <summary> /// Converts a word file to PDF /// </summary> /// <param name="sourceFilePath">The path of the word file to [...] read more
ms-office
office-interop
2votes
2answers

Catch RPC lock before error 0x800706BA

we have some tools and services which communicate with the same COM server. After some time we get the error COMException (0x800706BA) RPC server unavailable It seems that one application blocks the RPC while second tries to communicate and fail. It's not ever the same app and sometimes it takes [...] read more
c#
com
rpc
2votes
1answer

open specific word doc. depending on user selection c#

i currently have a word doc. file merging program and am attempting to open a specific word doc. depending on user selection. // sample of code used: string outputFolder = null; ... // file selection ... string outcomeFolder = outputFolder; string outputFile = "Combined Folder " + fileDate + " [...] read more
c#
2votes
1answer

The RPC server is not available (Excep_FromHResult 0x800706BA) when calling Background Task in UWP

I have developed UWP application where it play audio files in Background or when the phone is locked. The application works fine and everything seems perfect for 5-10 minutes. After that when I run the app, I cannot play audio file and I am getting the exception attached in the [...] read more
win-universal-app
windows-10
windows-10-universal
windows-10-mobile
2votes
0answers

Connecting to remote SQL Server instance using SQL auth via SqlPowershell?

I'm trying to use SqlPowershell/SqlPS (Import-Module sqlps) to connect to a server on my local network. I followed the instructions here to create a function that predefines a server/database and the login and prompts each time for the password: function sqldrive { param( [string]$name, [string]$login = "<myLogin>", [string]$root = "SQLSERVER:\SQL\<serverName>\<databaseName>" [...] read more
sql-server
powershell
sqlps
2votes
3answers

Getting an invalid object from a call to LyncClient.GetClient()

NOTE: UPDATED WITH A SOLUTION AT THE BOTTOM OF THE QUESTION I'm having some trouble with an application that uses the Lync 2013 SDK. Here is the behavior that I am seeing: * If Lync is already running when I start my application, then a call to LyncClient.GetClient() will return [...] read more
c#
lync-2013
lync-client-sdk
1vote
0answers

WBEMTEST fails with RPC Server is Unavailable (Tried all suggested possibilities and no luck)

I am using WMI to authenticate to a remote windows machine and not able to succeed. Therefore to dig deeper, I have used wbemtest and then tried to connect to the windows machine and got the below error message "RPC Server is unavailable". Any pointers on how to further narrow [...] read more
windows
networking
wmi
rpc
1vote
0answers

Whitelisting RPC dynamic ports

OS: Win Srv 2012 R2 and Win Srv 2016 Hello, I am quite confounded with the following: We get the following error when trying to execute certain commands and see the same error in Event Viewer for certain processes: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) I found [...] read more
windows-registry
windows-server-2012-r2
windows-server-2016
rpc
1vote
1answer

Windows XP services are offline and not starting

I recently installed a version of nLite on a computer, and after booting I noticed that a few things went wrong. 1. The theme was Windows 2000 2. None of the applications I had told nLite to install had installed 3. I could not switch the "Luna" theme 4. I [...] read more
windows
windows-xp
services
1vote
1answer

Domain Controller not auto enrolling Kerberos Certificate from new 2016 CA

I migrated a Windows 2008 R2 DC and Enterprise Root CA to a new Windows 2016 DC and CA. Everything seemed stable except I had a few RODCs and writeable DCs that were showing "Failed Requests" in the CA for their auto enrollment of the KerberosAuthentication Certificate. The error is: [...] read more
certificate
kerberos
certificate-authority
windows-server-2016
1vote
2answers

Error: "The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)" when using CNAME

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. 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 [...] read more
domain-name-system
cname-record
rpc
1vote
1answer

Restart-Server Powershell Port

I just ran into a problem with my remoting project in Powershell. I'm trying to remotely reboot a server sitting in a DMZ from within our intranet but get an RPC server unavailable error. The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) I know that that probably means that [...] read more
powershell
rpc
1vote
0answers

Add-Computer fails to run just after server is sysprep'd

I've developing a PowerShell 3 script to automate the deployment of a XenApp Windows 2008 image to a Hyper-V 2013 host. The basic steps are this: 1. Create and boots VM - script goes into wait loop for 15 mins 2. VM boots and sysprep runs. One of the steps [...] read more
windows-server-2008
deployment
sysprep
xenapp
1vote
1answer

Is it possible to backup an SQL Database hosted on an Azure VM, to our internal DPM2012?

I've got an SQL database on an azure VM (non domain) that i'd like to backup to our internal DPM 2012 server. I've installed the DPM agent on the Azure VM, setup DCOM to use only the ports 5000 to 5025 on both the VM and the DPM server, created [...] read more
backup
azure
scdpm
1vote
1answer

Certificate Error on Server 2008 R2 Event ID 6 and 13

I have two DC, one is a Windows Server 2003 (certificate server), the other is Windows Server 2008 R2. The Windows Server 2008 R2 has the following events in the event viewer. Source: Microsoft-Windows-CertificateServicesClient-AutoEnrollment Event ID: 6 Automatic certificate enrollment for local system failed (0x800706ba) The RPC server is unavailable. [...] read more
windows-server-2003
windows-server-2008-r2
ad-certificate-services
1vote
0answers

Certificate enrollment for Local system failed to enroll Event ID:13

I've just finished installing a second domain controller to gain redundancy in the network. (and to solve some issues) After installation and configuring all errors are gone but one that is: > Event Id 13: Certificate enrollment for Local system failed to enroll for a DomainController certificate with request ID [...] read more
windows-server-2008-r2
domain-controller
certificate-authority
1vote
1answer

RPC Error with Remote WMI Calls

On some of my servers, I am unable to make WMI calls remotely, even know the service is running and the firewall rules are there. When running something like: Get-WmiObject Win32_UTCTime -ComputerName ... I get: Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) read more
windows-server-2008
powershell
1vote
1answer

Error catching some info from remote computers who dont answer to ping

With little knowledge, I managed to assemble the script shown below, to obtain the amount of ram memory that the teams registered in the AD of the company have. #Import AD's module Import-Module ActiveDirectory #Grab a list of computer names from Active Directory (in City 3) $ComputerList = Get-ADComputer -Filter [...] read more
powershell
scripting
rpc
1vote
0answers

Unable to cast COM object of type Microsoft.Office.Interop.Excel.ApplicationClass to interface type Microsoft.Office.Interop.Excel._Application

I'm working on a Asp.net MVC project, which have a function that allow user to upload an excel file to server,server then process data from excel and save to database, It's working perffectly until to day,as the title, I met the follwing error: Unable to cast COM object of type [...] read more
c#
excel
asp.net-mvc
1vote
2answers

Error handling - PowerShell script

I have the following powershell script that cycles through a list of hostnames and changes the DNS settings for the active interfaces: $servers = Get-Content C:\users\kevin.todd\desktop\serverlist.txt foreach($server in $servers) { Write-Host "Connect to $server..." $nics = Get-WmiObject Win32_NetworkAdapterConfiguration -ComputerName $server -ErrorAction Inquire | Where{$_.IPEnabled -eq "TRUE"} $newDNS = "10.100.10.81","10.100.10.82" foreach($nic [...] read more
powershell
error-handling
1vote
1answer

Difference between Invoke-Command and query directly

I'm currently working on a script that queries the disk information from a server. I'm stack with a problem and I really don't know whats going on here. May you can help me. The following code is working (ComputerName replaced): $space1 = Invoke-Command -ComputerName "xxxxxx" -ScriptBlock { Get-WmiObject -Class Win32_LogicalDisk [...] read more
powershell
wmi
rpc
powershell-remoting
1vote
0answers

PHP exec doesn't return output of external program

I've the following program: function execute_query($ip, $username, $password, $query){ $runCMD ="python run_query.py " . escapeshellarg($ip). " ". escapeshellarg($username) . " " . escapeshellarg($password) . ' ' . escapeshellarg($query); $output = []; exec ($runCMD, $output); print_r ($output); //return (implode("\n", $output)); } However the array $output is always empty, the program is [...] read more
php
windows
exec
1vote
0answers

VirtualBox import appliance error - oracle R12

I am using virtualBox 5.1.0 and I am going to import the oracle R12 ova into the virtualBox. However, there appear a error that terminate the importing. Error massage: enter image description here [https://i.stack.imgur.com/rUnce.png] > Callee RC: RPC_S_SERVER_UNAVAILABLE 0x800706BA (0x800706BA) How can I fix this error and install the R12? [...] read more
virtualbox
1vote
1answer

Try-Catch: Why I'm still having uncaught errors?

I'm running the following script to identify whether there is drive Z: on a server. It contains try/catch, but I'm still getting "RPC-server is not available" errors like this: Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) At C:\Users\vlitovch\Documents\Get-DriveZRemotely.ps1:19 char:26 + ... $a = Get-WmiObject Win32_LogicalDisk -ComputerName [...] read more
powershell
error-handling
try-catch
1vote
0answers

Parallel Access to Word

I'm occasionallyfacing problems when programmatically dealing with two or more Word documents simultaneously. In my application I'm listening on the buttons of a Philips SpeechMike, of which one is used to save and close the Word document. There may be multiple process of my application (all listening on the buttons) [...] read more
c#
c++
ms-word
com
office-interop
1vote
1answer

C# Powershell Execution Error (Script runs fine in Powershell)

Quick synopsis of issue: I have a Powershell script I downloaded off net which purpose allows me to supply a parameter named 'computername' with a value of comma delimited IP addresses to run netstat on the remote machines and return the values. When I execute this script from Powershell console [...] read more
c#
powershell
1vote
2answers

Powershell Try Catch on Get-Printer

I have a little function to get all printer objects from a print server, the cmdlet throws an error if the spooler service is not available (e.g. the hostname is wrong). I want to catch that error message with a try catch, but it wont catch? Can someone explain this [...] read more
powershell
printing
try-catch
1vote
1answer

Connecting to Azure SQL Database via Powershell

I was trying to get powershell connect to Azure SQL Database from local. I tried the following snippet $params = @{ 'Database' = 'dbsitenamehere' 'ServerInstance' = 'instancename.database.windows.net' 'Username' = 'abcites' 'Password' = 'atbasIcpr0d' 'OutputSqlErrors' = $true 'Query' = 'SELECT * FROM Users' } Invoke-Sqlcmd @params But I was getting this [...] read more
sql-server
powershell
azure
arm-template
1vote
2answers

VSTESTcode coverage broken after SP1 for Visual Studio 2015 installed

This worked before SP1 was installed. namespace Test { public class Adder { public int Add(int n1, int n2) { return n1 + n2; } } } namespace AdderTest { [TestFixture] public class Class1 { [Test] public void AddTest1() { var add = new Adder(); var res = add.Add(2, 3); [...] read more
visual-studio-2015
nunit
code-coverage
vstest
1vote
1answer

PowerShell script to test remote connections to a server

I am new to PowerShell. An issue I am having is, when I run scripts against hundreds of servers, some of those servers are showing RPC unavailable in the PowerShell command line. e.g if I run the script: $list = Get-Content "C:\Users\hostnames.txt" foreach ($computer in $list) { Try { gwmi [...] read more
powershell
connection
rpc
connectivity
1vote
1answer

Send Outlook Mail (2013) Not working

I am writing a script that at the end will send an email with logs from a completed process. We use Outlook 2013 at work and I'm testing this on both outlook 2013 and Outlook 2010 with the same results. The script will only generate a mailitem if Outlook is [...] read more
powershell
outlook
1vote
1answer

Errors in .docx document creation

In my application I use Microsoft.Office.Interop.Word library to create .docx file with some content from template. Everything was working correctly on Word 2010 installed (Windows 7/2008 R2) but when I tried it on Windows 8 + Word 2013 I first started to get exception codes: HRESULT: 0x800706BA HRESULT: 0x80010105 The [...] read more
c#
windows-8
office-interop
word-2013
0votes
1answer

Windows 8 update error

When trying to update my computer to Windows 8.1 I get a message saying it couldn't update, so it restored the previous version and it gave this code 0x800706BA - 0x20003. I am very computer illiterate but I thought I could at least do an update. Before I could even [...] read more
windows
windows-8
windows-update
windows-8.1-upgrade
0votes
0answers

RPC server is unavailable 0x800706BA, while updating password for user in active directory

I am using System.DirectoryServices.AccountManagement apis to create a new user/disable an account in Active Directory. When i am trying to create a new user, and set its password, m/c throws an exception with the message The RPC server is unavailable. (Exception from HRESULT: 0x800706BA). The following snippet is used to [...] read more
active-directory
.net-4.5
0votes
0answers

How to retrieve the serial number of my NAS?

I need to retrieve the serial number of a NAS. From another PC, I wrote: wmic /node:x.y.z.k bios get serialnumber but I get this message: ERROR: Code = 0x800706ba Description = The RPC server is unavailable. Facility = Win32 I went to the server farm because I needed it quickly, [...] read more
nas
remote-connection
wmi
0votes
1answer

certutil -TCAInfo error message RegConnectRegistry/RegOpenKeyEx: The network path was not found. 0x80070035 (WIN32: 53 ERROR_BAD_NETPATH)

Recently we noticed the following errors were occurring daily in our Event Logs for servers in our DMZ: CertificateServicesClient-CertEnroll EventID 82 Certificate enrollment for Local system failed in authentication to all urls for enrollment server associated with policy id: {00B9F3A7-...-50628BC5AE7E} (The RPC server is unavailable. 0x800706ba (WIN32: 1722 RPC_S_SERVER_UNAVAILABLE)). Failed [...] read more
windows
certificate-authority
certutil
0votes
1answer

Windows 2008 Web Enrollment Fails The RPC server is unavailable. 0x800706ba (WIN32: 1722)

I am setting up an RA and a Subordinate CA who is also an AD. I can issue certs through certutil and the mmc snap-in with no problem. But when I try using Web Enrollment in the RA, it fails saying "The RPC server is unavailable. 0x800706ba (WIN32: 1722)" This [...] read more
windows
windows-server-2008
active-directory
ad-certificate-services
0votes
1answer

How to enable connection security for WMI firewall rules when using VAMT 2.0?

I want to use VAMT 2.0 to install product keys and active software in remote machines. Everything works fine as long as the ASync-In, DCOM-In, and WMI-In Windows Firewall rules are enabled and the action is set to Allow the connection . However, when I try using Allow the connection [...] read more
security
wmi
windows-firewall
0votes
1answer

What can I do to get rid of the error message: "The DSM service was delayed by 2409807 seconds for a driver query/download/install on device '...'"?

My little laptop runs with MS-Windows 8 and I am not getting windows updates anymore. I looked all day for a solution and so far came up empty handed. All the solutions proposed do not explain what could really be wrong. I tried to delete the "database" that's used to [...] read more
windows-update
drivers
windows-8.1
0votes
2answers

How do you edit a Powershell script to continue on an error?

I modified this script( https://gallery.technet.microsoft.com/scriptcenter/Create-HTML-Uptime-and-68e6acc0 ) to hit multiple servers, but it doesn't generate a report even if only one of the systems are down. How do I modify the script to continue on errors and generate the report at the end? The error is: Get-WmiObject : The RPC server [...] read more
windows-server-2008
powershell
0votes
1answer

'The RPC server is unavailable' when converting a physical ISA/Forefront TMG machine to virtual (P2V) in SCVMM

When I try to convert a physical ISA/TMG machine to virtual using SCVMM, i keep getting an error in the Collect machine configuration step ('Scan Now' button): > VMM is unable to complete the request. The connection to the agent MACHINE_NAME was lost. Ensure that the computer MACHINE_NAME exists on [...] read more
wmi
isa-server
rpc
physical-to-virtual
tmg
0votes
1answer

WMI query between two different AD sites?

I'm having problem in querying WMI between two different AD sites that is not trusting each other What I have tried: Telnet between Windows Server 2008 using IP address and port 135 is all working good vice-versa Start | run "WBEMTEST" between sites always end up in Error 0x800706BA with [...] read more
windows-server-2008
active-directory
wmi
0votes
2answers

The RPC server is unavailable. with hMailServer

Everything was running fine, until I restarted the server (there may have been some updates installed as well during that restart) and now I can't connect to retrieve mail and Administrator comes up with this exception when I try to view the status: The RPC server is unavailable. (Exception from [...] read more
windows-server-2008
sql-server-2008
rpc
0votes
2answers

Removing Cert Server from AD

My CA server crashed. It was used to deploy certs to messenger clients for live communication. I am no longer using live communication. I removed the server object from AD but my clients and servers envent logs have a lot of the following entries 1. Automatic certificate enrollment for local [...] read more
active-directory
certificate
certificate-authority
0votes
2answers

'The RPC server is unavailable.' when looping through word documents

I am working on a utility to find and update DOC VARIABLES in Word. I have a section of code to loop through the documents and present a Message Box with the variable name, but I'm receiving an error when it tries to open the next document. The error is: [...] read more
vb.net
ms-word
office-interop
0votes
2answers

Check/read registry key value on remote computer with local admin credential

How to check registry key value on computer which is not in domain?? I think that I must use local admin credential for this but I dont know how I tried this: $user = "admin" $password = "pass" | ConvertTo-SecureString -asPlainText -Force $computer = "computer" $domain=$computer $username = $domain + [...] read more
powershell
powershell-4.0
powershell-remoting
powershell-5.0
powershell-v6.0
0votes
1answer

How to handle System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

I am developing a Windows application where I manipulate Word Application. More specific, I am opening a Word Document but when I quit it and try to open another Word Document this Error comes out. How to handle > System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) [...] read more
c#
winforms
office-interop
comexception
0votes
2answers

If statement in PowerShell dependant on if RPC Server is unavailable

I'm writing a script in PowerShell that ideally would gather information from another server. If it's not able to reach that server, I want to prompt it to have the user manually enter the information. I know how to do all of these, but I'm getting hung up when the [...] read more
powershell
if-statement
rpc
0votes
1answer

How to properly access elements of Internet Explorer?

I have a script that tests whether one of our websites is working properly. 1. Test 1: It checks the HTTP status. (no problem here) 2. Test 2: It checks whether user authorization is working because we have had issues with this in the past. Then it waits one hour [...] read more
powershell
dom
com
internet-explorer-11
0votes
1answer

unable to get installed software details of vm machine of azure using System.Management

My requirement is to get installed software details of vm machine of azure and store the details in db. but when I try to get the details using System.Management class I am getting the below error > System.Runtime.InteropServices.COMException: 'The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)' below is my [...] read more
c#
azure
azure-virtual-machine
0votes
0answers

How to fix "CCertRequest::Submit: The RPC server is unavailable. 0x800706ba" error?

Scenario: I am learning AWS CloudHSM. So far, I have * created an EC2 instance with Windows Server 2019 Datacenter as OS * created a certification authority (root CA) on this server with Dintinguised Name "CN=myservername-CA1" ( https://docs.aws.amazon.com/cloudhsm/latest/userguide/win-ca-setup.html ) * while connected to EC2 instance via RDP, I can login [...] read more
c#
amazon-web-services
amazon-ec2
cryptography
hsm
0votes
1answer

Get-WmiObject deprecated now what?

I am trying to get the following function to work within PowerShell 6.0.2, however apparently Get-WmiObject has been deprecated. Can anyone help me figure out how to replace it with Get-CimInstance which has replaced it? Get-WmiObject is within the PROCESS area of the code below. Complete function code provided in [...] read more
powershell
0votes
0answers

Programmatically create a restore point

I checked around and even utilized/tweaked several solutions including the following, but I keep getting one of two errors. I either get ************** Exception Text ************** System.Runtime.InteropServices.COMException (0x80070422) at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32 errorCode, IntPtr errorInfo) at System.Management.ManagementObject.InvokeMethod(String methodName, ManagementBaseObject inParameters, InvokeMethodOptions options) at Check_In_Tool.checkInForm.CreateRestorePoint() in C:\Users\Greg\Source\Repos\Check In Tool\Check In Tool\Check In Tool\Form1.cs:line [...] read more
c#
.net
windows
systemmanagement
0votes
1answer

The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) - Excel

I tried to write data to a excel template file using asp.net c#. But I got following exception. ExceptionType: "System.Runtime.InteropServices.COMException" Message: "The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)" Sometimes it works for small count of rows. I cannot find what is the issue. try { int rowNumber = [...] read more
c#
asp.net
excel
interopservices
0votes
2answers

C# Word SaveAs RPC server is unavailable

private void CreateDocument(string date, string name, string phone, string father_name, string address, string village, string post, string taluka, string city, string district, string pincode, string product, int price) { string currentPath = System.IO.Path.GetDirectoryName(Application.ExecutablePath); // Get the Word application object. Word._Application word_app = new Word.Application(); // Make Word visible (optional). word_app.Visible [...] read more
c#
ms-word
0votes
1answer

Error handling 0x800706BA - RPC-Server not found

I have written a script to get the OSVersion from a List of Servers. Some Servers don´t respond to the "Get-WmiObject" command. I want a list of all Hostnames where this error occurs. This gives me an list of the first few Servers with this error. When the first Server [...] read more
powershell
exception
rpc
0votes
1answer

Get-WmiObject not handling variable as it's typed

Im trying to get list of all computers and logged on user for each computer. I get the list of computers, and when I query for each string returned, I can get the logged in user. However, when I use the computer name variable to get all users - I [...] read more
powershell
active-directory
0votes
0answers

WebViewControl: The RPC server is unavailable

We are trying to implement Edge embedding (C++) based on the example here: https://blogs.windows.com/msedgedev/2018/05/09/modern-webview-winforms-wpf-apps/#DuQiIVZ5t0Gjl9Ju.97 But we have an issue where the example code above fails to initialize the WebViewControl. both the async and sync initialization fails for the same reason: Exception thrown at 0x00007FFA48985299 (KernelBase.dll) in Win32WebViewSampleApp.exe: 0x800706BA: The RPC [...] read more
windows-community-toolkit
0votes
1answer

How can I change several Active Directory user passwords?

I'm trying to programaticaly change several user's password, specifically without using System.DirectoryServices.AccountManagement (PrincipalContext) I have this piece of working code: using System; using System.Collections; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.DirectoryServices; namespace ADScriptService.core { class ExportTool { const AuthenticationTypes = AuthenticationTypes.Secure | AuthenticationTypes.Sealing | AuthenticationTypes.ServerBind; private static [...] read more
c#
.net
active-directory
directoryservices
0votes
0answers

execWB works from Excel VB script but same code throws RPC exception in Powershell Script

Errors from Powershell version..... > Exception calling "Quit" with "0" argument(s): "The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)" At C:\Users\robp\Desktop\nbrs.ps1:19 char:13 + $ie.quit <<<< () + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : ComMethodCOMException Exception calling "ExecWB" with "2" argument(s): "The remote procedure call failed. (Exception [...] read more
excel
vba
excel-vba
powershell
0votes
0answers

Code to revoke a Microsoft CA certificate from outside the domain

I am trying to develop a .NET application to revoke a certificate obtained from a Microsoft CA. I was able to get it working using ICertAdmin::RevokeCertificate and the pointers given in this link. However, I find that the revocation works only if I run this application from a computer that [...] read more
c#
.net
certificate-authority
0votes
0answers

$ie.document method is not visible for console page in powershell

I am using powershell to automate login page but when i navigate to login console page there is no $ie.document method is visible. and showing the null error. Method present for console page are : CreateObjRef Equals GetHashCode GetLifetimeService GetType InitializeLifetimeService ToString Code I am using is :- $ie = [...] read more
powershell
powershell-2.0
domdocument
getelementbyid
comobject
0votes
4answers

Can't catch GetWMICOMException

Code like this, try { $NIC = Get-WmiObject Win32_NetworkAdapterConfiguration -ComputerName $Computername -Credential $Credential -filter "IPEnabled = $TRUE" } catch [GetWMICOMException] { "Error 1" } catch [System.UnauthorizedAccessException] { "Error 2" } get an error like: > Can't find type [GetWMICOMException]: catch [COMException] Same catch [System.Runtime.InteropServices.COMException] just ignored How can I catch [...] read more
powershell
0votes
1answer

Passing filepath parameters to function

Below mentioned code is giving error, and I'm not able to troubleshoot issue. Can anyone please help, we are just passing SourceFile and DestinationFile location to this function... ProcessDocumentsData "D:\Files\Scan1.doc","D:\Files\Scan1.csv" Clear-Host function ProcessDocumentsData { Param( [string]$SourceFile, [string]$DestinationFile ) $DestinationFileName = $DestinationFile $SourceFileName = $SourceFile $tableNum = 13 $delimiter = ',' [...] read more
powershell
0votes
0answers

Get-WmiObject -Class win32_volume

we are using powershell script for capturing the disk space & memory utilization related parameters for x number of servers and using the command "Get-WmiObject -Class win32_volume" we are able to get the required output for most of the servers , however couple of servers are throwing the following two [...] read more
powershell
0votes
1answer

"The RPC server is unavailable" only when running script

I am having issue with Powershell.I try and run my script which is Param ( [string]$ComputerName ) $ComputerName = $ComputerName -replace " ", "," Get-WmiObject Win32_OperatingSystem -ComputerName $ComputerName | select csname, @{LABEL='LastBootUpTime' ;EXPRESSION= {$_.ConverttoDateTime($_.lastbootuptime)}} I run it with: .\GetBootTime.ps1 -ComputerName localhost,<another computer> I get Error Message: > Get-WmiObject : The [...] read more
windows
powershell
0votes
1answer

C#: Why I can only connect to my ip address but the other ip address, getting error (WMI)

I'm trying to connect to other network using my pc but im getting error > (System.Runtime.InteropServices.COMException: 'The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)') However, It's only working if I connect to my pc itself. Is there any approach aside from this process because I cant even figure what's [...] read more
c#
networking
0votes
0answers

Generate status report for servers on different domain using Power shell

I am trying to generate server status HTML report for list of servers mentioned in text file. Some of my servers are in different domains so it gives me error. Error : Get-WmiObject : The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) At C:\Users\raj.negi.RESONATE\Desktop\WinServ-Status.ps1:143 char:32 + $OperatingSystem = Get-WmiObject [...] read more
powershell
cross-domain
0votes
1answer

Issues with WMI

I'm trying to build an application that can monitor an application on another computer on the network to ensure that it is running. I'm trying to use WMI to do that. I am able to access the server with wmimgmt.msc so it doesn't seem to be an issue of services [...] read more
c#
wmi
wmi-query
comexception
0votes
1answer

Change BIOS password through powershell

I want to build a script to change and/or set up BIOS password to HP workstations. Script i run as follows: C:\> $computers=Get-Content -Path c:\computers.txt C:\> foreach ($computer in $computers) { $passChange=Get-WmiObject -computername $computer -Namespace root/hp/instrumentedBIOS -Class HP_BIOSSettingInterface $passChange.SetBIOSSetting('Setup Password','<utf-16/>MYNEWPASSWORD','<utf-16/>') } Now, the following happen: 1. If my BIOS has [...] read more
powershell
bios
0votes
0answers

Get-PrinterDrvier cmdlet complains about unreachable RPC server

I am trying to receive a list of installed printer drivers from several Windows 7 and Windows 10 machines. Get-PrinterDriver -ComputerName Win7Machine This works on some of our Win7 machines and on others it doesn't. enter image description here [https://i.stack.imgur.com/o4ThV.png] HRESULT 0x800706ba translates to: The RPC Server is not reachable. [...] read more
powershell
remote-access
rpc
0votes
1answer

Error C# Invoke SetPassword AD

I'm trying to do a work for my final school project and I'm using C#, PHP, MySQL and Active Directory. The accounts will be created by the C# program into the Active Directory database, but I get this error while creating: System.Reflection.TargetInvocationException: O destino de uma invocação accionou uma excepção. [...] read more
c#
active-directory
passwords
invoke
0votes
1answer

Powershell Workflow to reboot computers

Code: workflow Test-RemoteReboot{ param ([string[]]$serverNames) foreach -parallel($server in $serverNames){ Restart-Computer -PSComputerName $server -Wait -Force } } Test-RemoteReboot SP,SP2 Issue: this is a small excerpt from a pretty long workflow I built in powershell. By all accounts, this should work but I get the following error (even when running this script [...] read more
powershell
0votes
1answer

WMI Connection to a Windows server on Azure

I am not able to make a WMI connection to any VM on Azure running windows OS. The same commands work perfectly well on my LAN and WAN to connect to any Windows machine. For example Get-WmiObject -Namespace "root\cimv2" -Class Win32_ComputerSystem -Impersonation 3 -ComputerName RemoteWinHost -Credential domain\username Works fine and [...] read more
powershell
azure
wmi
remote-access
0votes
2answers

Passing an array as parameter from CMD to PowerShell give problems

I have problems to pass an array to PowerShell script as parameter from CMD. Here an example of the PS code: [CmdletBinding()] Param( [string[]]$serverArray, ) $serviceName = 'service1' function getState { Process { $serverArray foreach ($server in $serverArray) { $servState = (Get-WmiObject Win32_Service -ComputerName $server -Filter "name='$serviceName'").State } } getState [...] read more
powershell
cmd
0votes
2answers

How to Remove a Ghost Server in Web Farm After Migrating a Reporting Services Installation?

Just followed the steps in https://msdn.microsoft.com/en-us/library/ms143724.aspx to migrate a Reporting Services installation onto a new server (from and to SQL 2012 Standard Edition) But when I'm ready to verify my deployment using the Report Manager web interface I get the error: > The feature: "Scale-out deployment" is not supported in [...] read more
sql-server
reporting-services
migration
0votes
1answer

New-CIMInstance dosent trigger try catch

why did the catch block $ComputerName = "server" try { #Hostname Abfragen der fürs CMI Query passt $OptDCOM = New-CimSessionOption -Protocol Dcom $CimSessionDCOM = New-CimSession -ComputerName $ComputerName -SessionOption $OptDCOM } catch{ Write-Host "Fehler beim CIM-Instance mit DCOM: $ComputerName" $array += $_.Exception.Message $BS = "PSR" } $BS doesnt trigger ? got [...] read more
powershell
try-catch
0votes
1answer

"RPC Server is unavailable" when exporting Outlook contacts to CSV

I am exporting Outlook contacts with a custom form to CSV from a specific Contacts folder. This folder is not the default location. It is a large folder with almost 7,000 contacts. This is a shared mailbox in Office 365, but we can't use the Outlook or Graph APIs because [...] read more
c#
outlook
office-interop
0votes
1answer

trying to automate browsing

I have an HTML Form like this: <input name="member[email]" id="memberemail" style="width: 220px;" type="text" value=""> <input name="member[password]" id="memberpassword" style="width: 220px;" type="password" value="" autocomplete="off"> <input class="continue" type="submit" value="Log In"> and I have a powershell script that authenticates and browses a page: this works fine. $username='xxx@mail.com' $password='<password>' $ie = New-Object -ComObject 'internetExplorer.Application' $ie.Visible= [...] read more
powershell
internet-explorer
ui-automation
0votes
1answer

unable to use SetPassword over domains through Powershell

I am trying to use the SetPassword method on a DirectoryEntry. $Root = New-Object System.DirectoryServices.DirectoryEntry("LDAP://dc.ourdomain.com/OU=Users,DC=dc,DC=ourdomain,DC=com", $ldapusername, $ldappassword, "Secure") $objUser = $Root.Create("user","CN=$DisplayName") $objUser.Put("sAMAccountName", "$username") $objUSer.Put("userPrincipalName","$userPrincipalName") $objUser.Put("givenName", "$firstname") $objUser.Put("sn", "$lastname") $objUser.Put("description", "$description") $objUser.Put("displayName", "$DisplayName") $objUser.Put("mail", "$email") $objUser.Put("company", "$Company") $objUser.SetInfo() $ObjUser.psbase.Invoke("SetPassword","qW12eR34") $objUser.psbase.InvokeSet(“AccountDisabled”,$false) $objUser.SetInfo() Whenever I run this, I keep getting the following error: [...] read more
powershell
active-directory
directoryentry
0votes
1answer

Itcl/Tcom/Tcl/Threads: Is this thread continuously running

In of the places I have written itcl code in a thread that kills excel method Kill_XL {} { thread::create { set rc [catch {exec taskkill /t /f /im Excel*} output] } sleep 5 } After that, for several different wish shells the following command invokes Excel App but I [...] read more
pthreads
tcl
itcl
0votes
1answer

How to write exception details to csv

Import-Module ActiveDirectory $computers = Get-ADComputer -Filter * -SearchBase "OU=workstations,DC=company,DC=org" | Select-Object -Expand Name $wmiObjs = Get-WmiObject -Class Win32_ComputerSystem -Property Name, Model -ComputerName $computers | select Name, Model | Export-Csv c:\temp\workstations-models.csv I am getting errors like the below which I would like to have placed into the CSV as well and [...] read more
powershell
wmi
export-to-csv
0votes
1answer

How can I fix "Unable to cast COM object of type 'Microsoft.Office.Interop.Outlook.ApplicationClass' / The RPC server is unavailable"?

I get the above error, which suspends activity in my app, when run on a particular machine. When I run it on my own machine, no such error occurs. Perhaps "The RPC server is unavailable" is the crux of the problem, but what would cause that to pop up after [...] read more
c#
office-interop
assemblies
com-interop
comobject
0votes
1answer

MVC Model for adding/editing/removing active directory user

The following code: public string AddADUser(string user_name, string password, string first_name, string last_name, string company_name) { try { List<ADUser> ADUsers = new List<ADUser>(); string admin_userName = "Administrator"; string admin_password = "Password!"; string domain = "sneaky"; var context = new PrincipalContext(ContextType.Domain, domain, admin_userName, admin_password); UserPrincipal NewUserPrincipal = new UserPrincipal(context, user_name, password, [...] read more
c#
asp.net-mvc
active-directory
0votes
1answer

Shutting down multiple PCs remotely

i want to shut down almost all PCs at my workplace (if they run more than 2 days) I've worked the last and this week on a Script and trying to get rid of Errors on the way. $days = -0 $date = (get-date).adddays($days) $lastboot = (Get-WmiObject Win32_OperatingSystem).LastBootUpTime $Computer = [...] read more
powershell
shutdown
0votes
0answers

Running multiple Batch files from different threads Java

I have n number of thread getting created at run time according to the input source files present in a folder. For every thread, I have one common class which has all the functions present that are used by every thread. Every thing is working perfectly except the part where [...] read more
java
windows
multithreading
batch-file
0votes
1answer

How to start new word instance without add-ins when word is already started

I am using Word (from 2007 to 2013) to convert documents to PDFA format, and i'm having trouble with users who have certain add-ins. When they use the system they get an assortment of COM Exceptions like RPC_E_SERVERCALL_RETRYLATER and (0x800706BA) RPC server unavailable. If they disable the add-ins it works [...] read more
c#
office-interop
com-interop
0votes
1answer

Error while instantiating MATLAB Engine Interface through COM (Matlab C# Integration)

I have called Matlab functions from C# using COM objects. It runs but on multiple calls it gives an exception while instantiating matlab Engine Interface through COM. //for instantiating MATLAB Engine Interface through COM MLApp.MLAppClass matlab = new MLApp.MLAppClass(); Exception it gives: > > Unable to cast COM object of [...] read more
c#
matlab
matlab-engine
0votes
2answers

Passing parameter to command in powershell

Could you tell my why this works: Get-WmiObject Win32_LogicalDisk -ComputerName xxx, yyy, zzz -Filter "DeviceID='C:'" | Select-Object pscomputername, @{Name="Size GB";Expression={ "{0:N2}" -f ($_.Size / 1GB)}}, @{Name="Free GB";Expression={ "{0:N2}" -f ($_.FreeSpace / 1GB) }} And this is not: $Machines = "xxx, yyyy, zzz" Get-WmiObject Win32_LogicalDisk -ComputerName $Machines -Filter "DeviceID='C:'" | Select-Object [...] read more
powershell
parameter-passing
0votes
1answer

Linphone for Windows Phone Crash - System.Exception: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA)

I get the git source code for Windows Phone (linphone-wp). I pass all steps from readme file and successfully compiled the project. I'm using Visual Studio 2013. I deploy the application. I can access any screen, but after I enter valid connection data for a real SIP account and after [...] read more
linphone
0votes
1answer

Proper way to detect if Excel has been quit and respond appropriately?

I have a Windows Forms app that opens an instance of Excel. If the user quits the app early, I want to make sure that this Excel instance has been quit. I tried calling the Excel instance's Quit() method if the instance was not null, like this: static class Program [...] read more
c#
excel
com
0votes
1answer

add dns record in from c#

How to add record in dns using c#, currently i am trying to use below code, but no luck. Manage DNS server by C# code AddARecord("dns01.iaxus.com", "iaxus.com", "10.0.0.20", "14.145.101.55"); 14.145.101.55 is my wan ip. its throwing below error. The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) please help. read more
c#
dns
0votes
1answer

Powershell WMIObject Error Handling

I have some code which connects to remote servers. I need to write into a text-file if a connection to the server cannot be made. I've done so with this code: try { $w3wpresult = (get-wmiobject Win32_Process -filter "name like 'w3wp%'" -computername $server | select name, @{l= "Private Memory (GB)"; [...] read more
powershell
0votes
1answer

The RPC server is unavailable while creating user in Active Directory

I am trying to get my asp.NET application to register new users in Active Directory. using the default Active Directory Membership Provider in asp (.NET 4.5) While logging in works just fine, I get the following error when trying to create a new user: The RPC server is unavailable. (Exception [...] read more
asp.net
azure
active-directory
rpc
membership-provider
0votes
1answer

BizTalk 2010 Configuration Failure

I've two 64-bit Windows Server 2008 R2 machines. On one of the machines BizTalk Server 2010 Standard Edition is installed & on the other SQL Server 2008 R2 is installed. When I use the 'BizTalk Server Configuration' on the BizTalk machine to create the necessary databases on the SQL Server [...] read more
configuration
biztalk
biztalk-2010
0votes
1answer

Unable to Cast COM Object of type

Language: Powershell Usage: Login into Website Code: (NOTE: Actual values for lines 1., 2., and 4. have not been provided) $username = "User" $password = "Password" $ie = new-object -com "InternetExplorer.Application" $ie.navigate("URL") $ie.visible =$true $doc = $ie.document $doc.getElementByID("username").value=$username $doc.getElementByID("password").value=$password $link = @($doc.getElementsByTagName('A')) | where-object {$_.innerText -eq 'Log In'} $link.click Lines [...] read more
powershell
scripting
0votes
0answers

stop process using WMI

I'm trying to stop a process on a remote machine using WMI try { ConnectionOptions connectionOptions = new ConnectionOptions(); connectionOptions.Username = IFS_username; connectionOptions.Password = IFS_password; connectionOptions.Impersonation = ImpersonationLevel.Impersonate; ManagementScope scope = new ManagementScope("\\\\" + IFS_IP + "\\root\\CIMV2", connectionOptions); scope.Connect(); ManagementPath path = new ManagementPath("Win32_Process"); ManagementClass services; services = new ManagementClass(scope, [...] read more
c#
process
wmi
remote-access
0votes
2answers

powershell catch exception codes for wmi query

I am checking for services using WMI on a group of computers but with some I am getting errors. How do I capture these errors so I can take approptiate action? The query is $listOfServices = Get-WmiObject -credential $wsCred -ComputerName $comp.name -Query "Select name, state from win32_Service" If I get [...] read more
powershell
exception-handling
try-catch
wmi
0votes
0answers

Get-WmiObject : The RPC server is unavailable

I am getting the following error when I tried to get disk size information from the server. The script that I am using runs fine against my other 62 SQL servers however it is failing to connect to 3 of them. I do not believe it is my powershell script [...] read more
sql-server
powershell
wmi
0votes
2answers

Check If a program is installed on multiple computers using Powershell

I'm having issue with a script I've written and would love some help. Please note I'm very new to powershell. I've written a script that uses a txt file that contains remote computers on a domain, I appears to be working to some degree but in the event of a [...] read more
powershell-4.0
installed-applications
0votes
2answers

WordPerfect COM Automation Error

In c# .Net 4.0 I am attempting to automate WordPerfect. To do this I add a reference in my project to the wpwin14.tlb file that lives in the WordPerfect program folder. That has the effect of creating the COM interfaces within my project. Next I should be able to write [...] read more
c#-4.0
com
wordperfect
0votes
1answer

How to recycle aws server app pool remotely

I am trying to recycle the aws app pool remotely using below syntax using (DirectoryEntry appPoolEntry = new DirectoryEntry( "IIS://" + appPoolModel.ServerName + "/W3SVC/AppPools/"+appPoolModel.AppPoolName)) { appPoolEntry.Invoke("Recycle", null); appPoolEntry.Close(); } But i am getting this below error > System.Runtime.InteropServices.COMException (0x800706BA): The RPC server is unavailable. For aws server i am using [...] read more
c#
amazon-web-services
-1votes
0answers

How can I save an Excel document in Blue Prism?

I have developed a process using sample Excel data. It is working fine but when I went to save my results, they each threw the following error: > Internal : Could not execute code stage because exception thrown by code stage: The RPC server is unavailable. (Exception from HRESULT: 0x800706BA) read more
blueprism
rpa
-1votes
2answers

Loop through servers and output results along with errors

I wrote a simple PowerShell script to retrieve a list of servers' last boot time and output the results to grid view. The results are immediately shown in the grid window but and comes to a short pause whenever a server is not responding to the get command, either due [...] read more
powershell
out-gridview
-1votes
1answer

Powershell - free disk space alert - add Test-connection

Ok, i try add Test-Connection and now the code look likes this: $html= @' <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <title>HTML TABLE</title> <style type="text/css"> .alert {{ background-color: #FB1717 }} .statusCom {{ background-color: #FB1717 }} </style> </head> <body> <table> <colgroup><col/><col/><col/><col/><col/><col/><col/><col/></colgroup> <tr><th>SystemName</th><th>DeviceID</th><th>VolumeName</th><th>Size(GB)</th><th>FreeSpace(GB)</th><th>Status</th></tr> {0} </table> </body></html> '@ $entryTemplate [...] read more
powershell
-1votes
1answer

How to list out disk-info?

Edited after some development. I'm trying to make a script that finds all computers in an Organizational Unit (in Active Directory), and lists out size of the drive and amount of free space available. This is what I got now: $ou = Get-ADOrganizationalUnit -Properties * -Identity 'ou=Brukere,DC=GGR11,DC=local' $RemServer = "xxx.xxx.xxx.xxx" [...] read more
powershell
active-directory
wmi
diskspace

Comments

Leave a comment

(plain text only)

Sources

  1. https://msdn.microsoft.com/en-us/library/cc231198.aspx
  2. winerror.h from Windows SDK 10.0.14393.0

User contributions licensed under CC BY-SA 3.0