Test WMI connection

Hello. I've been reading quite a bit about testing WMI connections towards remote computers, but I haven't quite found the answer I am looking for.
What I am going to do is several gwmi calls against all the computers in the domain. This will surely lead to several "The RPC server is unavailable" error messages as all computers will not be powered on and some "No Access" messages.
Since my script includes several gwmi calls for each computer I want to test the gwmi connectivity against each computer before I run all the gwmi calls. I want this test do be done as quickly as possible.
Some pages I've visited suggests using "Test-Connection", but that doesn't test towards for example "No Acces" does it?
I've found this (see code below) and I'm wondering if that is the best way to do it:
$wmi = gwmi win32_bios -ComputerName $pc-ErrorAction SilentlyContinue
if ($wmi)
    #put all wmi calls here.
Kind regards,
Nils Rune

Hi, I try to use your script
$ping = New-Object System.Net.NetworkInformation.Ping
$Reply = $ping.send($strComputer)
if ($Reply.status –eq “Success”) 
{ $WS.Cells.Item($row, 2) = "Online"
 try {
 $results = Test-Connection $strComputer
 If ($results) {
 $ws.rows.Item($row).Font.ColorIndex = "5"
 $WS.Cells.Item($row,3) = "WMI OK" } 
 Else {
 $ws.rows.Item($row).Font.ColorIndex = "3"
   $WS.Cells.Item($row,3) = "WMI Failed" }
 catch
    Write-Host "Test-Connection Failed"
 Else { 
 $WS.Cells.Item($row, 2) = "Does Not Ping"
 $ws.rows.Item($row).Font.ColorIndex = "3"
BUT at the first line, I added this parameter to specify that the script has to read the computer'name
from a TXT file :
$strComputer = Get-Content "C:\Temp\ComputersList.txt"
When I run the script, I got the error : "You cannot call a method on a null-valued expression" Do you
have an idea please ?
Thank you

Similar Messages

  • SQL Developer crashing when opening or testing a connection

    SQL Developer closes abruptly when opening or testing a connection.
    Here's what I do.
    Open SQL Developer.
    Create a connection:
    Connection Name: [some string]
    Username: [username]
    Password: [password]
    Save password: checked
    Oracle tab:
    Connection type: TNS
    Connect Identifier: somedatabasename
    Then I click on "Test" and the application immediately quits. No error messages. The app does the same thing if I save the connection and try to expand its node on the list of connections.
    Mind you, if I use sqlplus like so:
    [username]/[password]@somedatabasename
    It connects just fine.
    I captured the output from the command console after SQL Developer crashed:
    Microsoft Windows [Version 6.1.7601]
    Copyright (c) 2009 Microsoft Corporation. All rights reserved.
    C:\Oracle\product\sqldeveloper\sqldeveloper\bin>sqldeveloper
    _execv() failed, err=2Registered TimesTen
    # A fatal error has been detected by the Java Runtime Environment:
    # EXCEPTION_ACCESS_VIOLATION (0xc0000005) at pc=0x000000006d9f97c5, pid=5480, t
    id=5840
    # JRE version: 6.0_43-b01
    # Java VM: Java HotSpot(TM) 64-Bit Server VM (20.14-b01 mixed mode windows-amd64
    compressed oops)
    # Problematic frame:
    # V [jvm.dll+0x1397c5]
    # An error report file with more information is saved as:
    # C:\Oracle\product\sqldeveloper\sqldeveloper\bin\hs_err_pid5480.log
    # If you would like to submit a bug report, please visit:
    # http://java.sun.com/webapps/bugreport/crash.jsp
    I am using:
    sqldeveloper 3.2.20.09.87 (64-bit)
    Java 1.6.0_43 (64-bit)
    Windows 7 Enterprise SP1 (64-bit)
    ODAC 11.2.0.3.20 x64
    Please help!
    Edited by: 993662 on Mar 13, 2013 9:10 AM

    @Jim:
    Thanks for your suggestion. After several hours of experimenting, I've managed to fix my problem by copying the ojdbc6.jar from my ODAC installation and replacing the one in [sqldeveloper root]\jdbc\lib
    To whomever has a similar issue: See my original post for what software I was using and their version numbers.
    Edited by: FrostyZoob on Mar 14, 2013 8:11 AM

  • Query a List of Open WMI connections on a server from a remote system

    We are monitoring a specific windows service on a server using Sitescope remote monitoring. The sitescope system uses a WMI method to Check if the service on a specific server is up or not. Initially it works like a charm but over time the WMI connections from
    sitescope time out and we have been told that Sitescope is not closing the WMI connection it opens gracefully and the open connections pile up.
    I am looking for a way to list open WMI connections to a specific service and/or server from a remote system and a way to kill those connections via a scheduled PowerShell (or batch/perl) script. I was able to list specific classes by -list parameter
    of the Get-WmiObject cmdlet
    but am unable to determine which class will give me the information that I require and the method to kill those connections.

    Sitescope is not closing the WMI connection it opens gracefully and the open connections pile up.
    1. It's not clear what "not closing the WMI connection it opens gracefully" means. WMI is a management technology that uses DCOM to connect to remote computers. (Is it really a question about DCOM?)
    2. It's not clear what specifically "open connections pile up" means and what problem(s) it causes.
    3. This is really a support question for that software's developer, not a question about WMI.
    -- Bill Stewart [Bill_Stewart]

  • Error while testing ITS Connection

    Hi all:
         There is an error while testing ITS Connection,  it says the 8000 port is a closed point by the firewall ,  but according to the
    administrator of intranet,  there is no firewall between ECC and Portal, I guess I should add port 8000 into service file ? I mean the file of Host and Service, am I right ?
    An HTTP/S connection to http://10.180.80.171:8000 was not obtained successfully; this might be due to a closed port on the Firewall.

    thank you very much for your help. for update server's full name, may I put the mapping values  into host file in the format of  <ip address> <hostname.domain name> <hostname>, do you think it is OK?
    in the second blog you suggest there is something about Server port(please refer to the following):
    in the window machine, there should be an entry like sapms<SAP System ID> , can you please give me a full example:
    let's say my system ID is EC1,  so it would be sapmsEC1  8000/tcp, right ?
    Here you have to enter the port of your application server. By default this is 80<SAP System ID>. But your basis administrator can modify this setting, thatu2019s why you should check it in the transaction SMICM (Goto -> Parameters -> Display). For example the IBSolution Development System Erinome the port is 8000.
    You can also have a look into your services file on your machine. If you have a windows machine then the file exists e.g. here C:\WINDOWS\system32\drivers\etc\services
    In this file you should search a entry like sapms<SAP System ID>.
    Edited by: jingying Sony on May 24, 2010 4:41 PM

  • Error while testing Driver connection Through The EnterPrise Manager

    Hi -
    I am using OAS 10.1.3v for my application.I am using both SQL Server 2000 JDBC driver and Oracle JDBC driver for my application. I am encountering problems due to SQL Server 2000 JDBC driver.
    I tried testing for connectivity for SQL driver through the enterprise manager.(on the em console, inside home/administration/JDBC resources ). I am getting the following error :
    Unable to create : com.microsoft.jdbc.sqlserver.SQLServerDriver
    Missing class: com.microsoft.jdbc.sqlserver.SQLServerDriver Dependent class: oracle.oc4j.sql.config.DataSourceConfigUtils Loader: oc4j:10.1.3 Code-Source: /E:/product/10.1.3.1/OracleAS_1/j2ee/home/lib/oc4j-internal.jar Configuration: in META-INF/boot.xml in E:\product\10.1.3.1\OracleAS_1\j2ee\home\oc4j.jar This load was initiated at ascontrol.web.ascontrol:0.0.0 using the Class.forName() method. The missing class is available from the following locations: 1. Code-Source: /E:/product/10.1.3.1/OracleAS_1/j2ee/home/applib/mssqlserver.jar (from in /E:/product/10.1.3.1/OracleAS_1/j2ee/home/config/server.xml) This code-source is available in loader global.libraries:1.0. This shared-library can be imported by the "ascontrol" application
    I tried adding mssqlserver.jar to the shared library.Still, i got the same error.
    The connection which i am trying to test, has the following entry in the data-sources.xml :
    <connection-pool name="BPELPM_CONNECTION_POOL1" max-connections="30">
         <connection-factory factory-class="com.microsoft.jdbc.sqlserver.SQLServerDriver" user="sa" password="" url="jdbc:microsoft:sqlserver://localhost:1433;databaseName=WE411;selectMethod=cursor" commit-record-table-name=""/>
         </connection-pool>
         <managed-data-source connection-pool-name="BPELPM_CONNECTION_POOL1" jndi-name="jdbc/ExpressJDBCDataSource" name="ExpressJDBCDataSource"/>
    I also tried with native-data-source option in the data-source.xml without a connection pool like -
    <native-data-source
    name="ExpressJDBCDataSource"
    jndi-name="jdbc/ExpressJDBCDataSource"
    description="Native DataSource"
    data-source-class="com.microsoft.jdbc.sqlserver.SQLServerDataSource"
    user="sa"
    password=""
    url="jdbc:microsoft:sqlserver://localhost:1433;databaseName=WE411 ;selectMethod=cursor ">
    </native-data-source>
    I am getting the same error as above.
    Has anybody encountered a similiar problem ?
    A related post that was posted by me is :
    SQL Server Driver Problem in Oracle Application Server 10.1.3 data-sources

    thank you very much for your help. for update server's full name, may I put the mapping values  into host file in the format of  <ip address> <hostname.domain name> <hostname>, do you think it is OK?
    in the second blog you suggest there is something about Server port(please refer to the following):
    in the window machine, there should be an entry like sapms<SAP System ID> , can you please give me a full example:
    let's say my system ID is EC1,  so it would be sapmsEC1  8000/tcp, right ?
    Here you have to enter the port of your application server. By default this is 80<SAP System ID>. But your basis administrator can modify this setting, thatu2019s why you should check it in the transaction SMICM (Goto -> Parameters -> Display). For example the IBSolution Development System Erinome the port is 8000.
    You can also have a look into your services file on your machine. If you have a windows machine then the file exists e.g. here C:\WINDOWS\system32\drivers\etc\services
    In this file you should search a entry like sapms<SAP System ID>.
    Edited by: jingying Sony on May 24, 2010 4:41 PM

  • Error "4" when trying to test my connection

    Hi, please help me find out how to fix this error:
    when i try to test the connection pops up an error message with only a number "4" in it, nothing else. what's this error message about and how do i fix it??
    Thanx in advance!!!

    Hi,
    unfortunately we cannot help without having connection to that database. It looks like you are trying to connect to Oracle 8 - not supported anymore.
    Philip

  • A network error when i tested the connection of a proxy user

    Good evening
    I 'd created a 3 appliances Filer system . Filer 1.1.0.653
    The Filr Apl is in DMZ and every ports are open between it and the 2 Windows boxes (AD and File Sharing)
    Every thing seems well. I could inport AD users, create filr users, and work ...
    But when i want to create a NetFolder server, impossible to pass the connection test
    Name : Cn=Administrateur, cn=Users,dc=arcdom,dc=arcane-inf,dc=com (Administrateur because i'm French :=)
    or
    Name : Administrateur
    or
    Name = arcdom\Administrateur
    Click on test connection => an network error occurs
    I'd try with a "Filr" ADuser with same ACL as Administrateur, same ...
    The Novell-FAMT is running. (I tried to restart it without succes)
    Help .......
    LP Irovetz

    Originally Posted by LPIROVETZ
    Good evening
    I 'd created a 3 appliances Filer system . Filer 1.1.0.653
    The Filr Apl is in DMZ and every ports are open between it and the 2 Windows boxes (AD and File Sharing)
    Every thing seems well. I could inport AD users, create filr users, and work ...
    But when i want to create a NetFolder server, impossible to pass the connection test
    Name : Cn=Administrateur, cn=Users,dc=arcdom,dc=arcane-inf,dc=com (Administrateur because i'm French :=)
    or
    Name : Administrateur
    or
    Name = arcdom\Administrateur
    Click on test connection => an network error occurs
    I'd try with a "Filr" ADuser with same ACL as Administrateur, same ...
    The Novell-FAMT is running. (I tried to restart it without succes)
    Help .......
    LP Irovetz
    From the docu:
    Click the Authentication tab, then specify the following information:
    Proxy name and password: Specify the fully qualified, comma-delimited name and password for the proxy user used to access the OES, NetWare or Windows, server. (You can use the Browse icon next to the Proxy field to browse the LDAP directory for the proxy user that you want to use.)
    IMPORTANT:Before you specify a proxy name and password for the Net Folder server, ensure that you review the information in Section 8.1.2, Planning the Net Folder Server Proxy User.
    Test connection: Click this button to ensure that the path is accurate and that the credentials are valid, then click OK after the test succeeds.
    Sometimes proxy users with the incorrect context pass this test. Ensure that the context for your proxy user is correct, as described in Expected Name Format for File Servers.
    Authentication type: Select the authentication service for the file server that you are connecting to. This option corresponds with the Server type setting that you selected on the Configuration tab. If you selected OES or NetWare as the server type, only Novell NMAS is available as the authentication type. If you selected Windows as the server type, you can select either Kerberos, NTLM, or Auto detect as the authentication type. (Auto detect means that it tries authenticating with Kerberos first, and if that fails, authenticates with NTLM.)
    NOTE:If Kerberos is selected as the authentication type, ensure that the DNS name server is able to resolve DNS queries for the Active Directory domains.
    If the Kerberos port (port 88) is disabled on the Windows server, select NTLM as the authentication type.
    So you should use comma delimited name for the username... Did you also try browsing for the user using the icon there?
    Does is log any specific error message in /opt/novell/filr/apache-tomcat/logs/appserver.log file when you try to test the connection?
    Thomas

  • Error in Connection Test when connecting to R/3

    Hi All,
    Although I am able to connect to the R/3 server through the portal (SAP screen is visible and the transactions are running,) the Connection Test fails at the second step i.e. the Connector settings and User Mappings. I have checked these settings and they appear to be fine.
    The Test connection results are as follows:
    a> Retrieval of default aliases successful.
    b> Connection Failed. Make sure User Mapping is set correctly and all connection properties are correct.
    I am also unable to connect to the data source through the Visual Composer. Although the systems are visible, the Bapis are not retrieved. It returns the same error. I have even installed the Portal Add-ons for Visual Composer.
    Please help.
    Regards,
    Deepak.

    Hi Guys,
    Thanks to you all for the suggestions. Rajiv, the settings are as per your suggestions, yet its not working. Also, we are using UIDPW method to logon to the R/3 system. We are able to connect to the R/3 system through the portal and even the transactions are running. The problem is when we test the connection. It fails on step 2. The problem this is causing is that we cannot connect retrieve the data from the R/3 system through Visual Composer. We can connect to the portal thru it though and even the systems are available. But once we select the system and try to retrieve the BAPIs, it throws an error.
    We are using EP6.0 SP9 and Visual Composer 6.0 Patch 5.
    Regards,
    Deepak

  • How to test the connection between DSD backend and DSD connector

    Dear all,
    I am configuring the MDSD scenario .. and i want to insure that my customization is correct
    How to test the connection between DSD Backend and DSD connector ??

    Hi Viren,
    The problem is:
    We have a new BW system. The basis people asked me to check the connection between this BW system and the R/3. There is only one client for now(100). I have logged into 100 and tried executing RSA1 to check the connection, but it gave a message box saying "You can only work in Client 000". Then I have treid logging into 000(just to make sure) and tried executing RSA1. Even here I got a message saying "The SAP BW system must not be operated in client 000". Now, I am not sure of what is wrong in clien 100. I am not sure if I have to do some settings before I access RSA1 or any other BW transaction. Could you please help me in this.
    Also, I just checked the RFC destinations in BW. There is a destination created for our R/3 and I have noticed that they have given a remote UserID and password for remote login. I tried to check the Remote UserID in SU01 but there is no userID with that name. Could this be a problem?
    Thanks,
    RPK.

  • Can I use OCI driver to test database connection in JDeveloper9.0.3

    When using JDeveloper 3.2.3, I can use oci8 driver to test the databse connection.
    Then I want oci8 driver work in JDeveloper9.0.2 or JDeveloper 9.0.3. However, it cannot work.
    (Note: but thin driver works fine)
    First, I read the help file and setup ORACLE_HOME environment variable and install
    OCI client driver ocijdbc9.dll on my compuetr. Then some exception is happening when I test again.
    So I want to know, does anyone succeed in testing the connection via oci driver
    and how to fix this problem.
    Thanks a lot.

    Hi !
    You MUST use jdbc library supplied with Oracle client ( so classes12.zip from $ORACLE_HOME/jdbc/lib ), not with JDeveloper - this one might be incopatible with oci native libraries.
    I hope , this helps.
    Michal

  • How do You Test EMail Connectivity?

    How do You Test EMail Connectivity?
    Once you setup the mail gateway with an IP address, port, and domain name.  How can you test email connectivity?  How do you force the MARS Appliance to send an email?

    There is no "test e-mail connectivity" button/function. Essentially you need to configure inspection rules to notify you when they are fired by mars.
    You will need to setup a user (preferably a non-admin account for testing) under "Management"-"user management"(if you haven't already done so) make sure to supply e-mail address.
    http://www.cisco.com/en/US/docs/security/security_management/cs-mars/6.0/initial/configuration/setup.html#wp1030836
    Now you can "Configure a Rule to Send an Alert Action." the following link explains how to do this...An easy one would be the "System Rule: CS-MARS Login Failures - Non-Admin User" rule. Follow the instructions in the link below under the "Configure a Rule to Send an Alert Action" section to modify the rule mentioned above. Keep in mind that this rule only fires when there are login failures. Once you have modified this rule try logging into mars using the non-admin user with a bad password...you should get a e-mail from MARS.
    http://www.cisco.com/en/US/docs/security/security_management/cs-mars/6.0/user/guide/combo/alerts.html#wp1056101
    Hope this helps.
    Dustin Suko

  • Testing the connectivity between Integration Directory&  Integration Reposi

    Hi Experts,
    I am verifying  the configured PI7.0 server,but i am not able to fine the Integration scenarios at the stage :
            (Testing the connectivity between Integration Directory and
             Integration Repositor)
    In Integration Directory Configuration  screen when i click on tools----
    >Transfer Integration Scenario from Integration Repository’.
    it is displaying the dialog box with question mark sign,when i click this sign it is displaying another dialog box adn displaying as NO OBEJCTS FOUND.
    So can any body help me in this matter. with detail procedure with  steps in sequence order.
    I appreciate the accurate and soon reply
    Thanks in Advance
    regards
    Ken

    > Hi Barry ,
    >
    > Thanks for the Immediate reply.
    > Could you  pls send me how to create BPM  in IR  with
    > step by step
    > Then how to call that in ID.
    >
    > Please send me the detail procedure  with steps.
    >
    > Thansks in Advance
    >
    > regards
    > ken
    You do not need to do that.  Import the BASIS and ABAP Content, and these are already included. 
    Why work harder than you need to
    If you want to create a BPM, then follow one of the how to guides:
    https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/40697f5e-088d-2910-6592-cefedf19860e
    https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/docs/library/uuid/d46b9b90-0201-0010-ef92-9964c1bc98e1

  • Need to test db connectivity from Oracle 8.1.6 NT client

    Our applications run on Windows NT servers and connect to the Oracle db server through an Oracle 8.1.6 NT Client. The Oracle db server is running Oracle 8.1.6.2 on HPUX 11.0. I am using commands in a batch file to restart the application services on the NT server when the database is brought down. Before starting the services back up I need to be able to make sure that the database is up. I was using the tnsping command to do this, but I found out that tnsping gives an 'OK' response when the listener is running and the database is down. I need something that works like tnsping, but tests for connectivity to the database, not just the listener.
    I appreciate any help anyone can give me.
    The following is the code from the batch file:
    REM ******************************************************
    REM Stop the TM Proc Mon Service
    net stop TMProcMonSrvc
    REM ******************************************************
    :CHECKDB
    REM Check the connectivity to the database
    tnsping tm52ut
    REM Check to see if the tnsping was successful (=0)
    IF %ERRORLEVEL%==0 GOTO STARTTM
    GOTO CHECKDB
    REM ******************************************************
    :STARTTM
    REM Start the TM Proc Mon Service
    net start TMProcMonSrvc
    REM ******************************************************
    :EXIT
    exit

    Use sqlplus. Use a bogus username/password (if and watch out for the Invalid username error. If you get an invalid username/password error then the db is up else it is down. Suggestion: It would be much easier to write a wsh script that uses ADO to connect to the db. Batch files do not give you much control over the shell.

  • ODI  Agent Test Failed -Connection timed out

    Hi,
    I have created an agent and launched it as a scheduler agent using command :
    ./agentscheduler.sh -name="Agent_Test" -port=20911
    it gives message -Server Launched
    However when I test it in Topology Manager in Physical Architecture , it gives me error-Agent Test Failed-Connection Timed Out.
    Any pointers to why is this error appearing and how it could be resolved ?
    Thanks!

    Check the port number and also the odi parameters in odiparm.sh
    Thanks,
    Nagarjuna

  • Get an error when testing the connection

    Hi
    I'm using the B1i with SBO 2007.
    I'm able to create my own system. I filled in everything except under the field "jcoPath". Do we need to fill in the rest???
    I get the following error when I test the connection
    HTTP Status 404 - com.sap.b1i.xcellerator.RejectedException: XCE045 IPO-Step not known: /0010000102.testconnection/com.sap.b1i.system.sld/ipo/SystemConnection.ipo/testconnection
    type Status report
    message com.sap.b1i.xcellerator.RejectedException: XCE045 IPO-Step not known: /0010000102.testconnection/com.sap.b1i.system.sld/ipo/SystemConnection.ipo/testconnection
    description The requested resource (com.sap.b1i.xcellerator.RejectedException: XCE045 IPO-Step not known: /0010000102.testconnection/com.sap.b1i.system.sld/ipo/SystemConnection.ipo/testconnection) is not available.
    Apache Tomcat/5.5.17
    Can someone please tell me what the problem is???
    Thanks in advance

    Hi Ian
    Thank you for your response, greatly appreciated. If i go to the path you suggest below I do not have the JCO lobaries there.
    Mine is under C:\Program Files\SAP\SAP Business One Server\DI API\JCO\LIB because they have changed the file tructure slightly in SAP 2007.
    I agree that this should be added but it is still not working.
    Any other ideas???
    Thanks in advance

Maybe you are looking for

  • Microphone issues

    I am hooking up just a basic computer microphone to my G5 and I can't get it to work at all. Do I need a special mic?

  • Can Adobe Live Media Encoder encode with Left audio only?

    Hi all, I have a live feed video that contain dual audio (left = Englisg, right = Chinese). Can i use Adobe Live Media Encoder to encode with English audio mono ONLY so that FMS can stream it to user with left&right = English audio? Thank you.

  • Tuxedo 8.0 install on RedHat 2.1 fail

    Hi, I'am trying install Tuxedo 8.0 Client over RedHat 2.1 Advanced Server. The installation hangs and the ps command shows a java process defunct. I suspect that the .java_wrapper packaged in the tuxedo80_linux.bin fails. Does somebody have any idea?

  • Retaining date/time stamp when copying files from a backup network drive

    How do I retain the date/time stamp when copying files from a backup such as a external drive or a network drive?

  • How to set query result to a single window

    I am using SQL Developer 2.1063, and not happy with the default setting of result window. Everytimes when I run a query, the result appear in a new result window. Over a couple of hour I have tense or hundreds of result tabs in the low window. It is