Using different credetial to connect to remote computer to get Cert information

I am using following function to get cert details from remote computers. How do I change it to accept credentials to connect to remote computer?
PS : Remote computers are windows 2003 computers without PowerShell installed on it.
function Get-Cert( $computer=$env:computername ){    $ro=[System.Security.Cryptography.X509Certificates.OpenFlags]"ReadOnly"    $lm=[System.Security.Cryptography.X509Certificates.StoreLocation]"LocalMachine"    $store=new-object System.Security.Cryptography.X509Certificates.X509Store("\\$computer\my",$lm)    $store.Open($ro)    $store.Certificates}Get-Cert ServerA
-Edatha-

Certainly.  Here's a quick example that uses the PowerShell registry provider as a quick an easy way to enumerate the subkeys of HKLM\Software\Microsoft\SystemCertificates\MY\Certificates\ , and to read the Blob value as a byte array.  In your
case, you'd probably want to look into using something like WMI's StdRegProv class to accomplish the same thing.
Once you have the byte array, just pass it to the constructor of X509Certificate2.  (Note the unary comma in that constructor call; we're binding an object to the -ArgumentList parameter of New-Object, and when you're calling constructors that take
a single array argument, you need the comma.)
Get-ChildItem HKLM:\SOFTWARE\Microsoft\SystemCertificates\MY\Certificates |
ForEach-Object {
$byteArray = (Get-ItemProperty -Path $_.PSPath -Name Blob).Blob
$certificate = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2(,$byteArray)
$certificate

Similar Messages

  • Use user account to connect to other computer

    Hi everyone,
    I'm running windows 7 machine and i have a domain for study purpose so i was using file sharing option and i checked use users account to connect to other computer.
    Advanced sharing and i select use user accounts and passwords to connect to other computers
    so after selecting this option it logged me out and bring me to the log in option but i can not see my computer log-In name i see only remote log In name and other user option so how do i log into my
    Windows 7 computer? not the remote computer
    Please help i want to get back to my windows 7 computer because im  logged out and i don't know how to log-In
    i can only log-In the domain user account but i want to log in as windows 7 account not the domain account
    please help

    Perhaps the GPO prevent you from logging locally with user account that is NOT member of domain users. You should change GPO and either wait for applying it of force the update. Remember that some GPO may need restart.
    HTH
    Milos

  • Using sharepoint designer 2013 - connected to sharepoint online - but getting " data source file cannot be saved" after making a new linked datasource

    using sharepoint designer 2013 - connected to sharepoint online - but getting " data source file cannot be saved" after making a new linked datasource

    Hi,
    Based on your description, I have done a test and I can’t reproduce your issue.
    I have used SharePoint Designer 2013 to open a SharePoint Online site and there are no issues.
    I’d like to clarify whether you encounter any issues when accessing SharePoint Online sites. If there are no issues during the accessing procedure, SharePoint Online service should be working fine at your side. The issue may be caused by specific SharePoint
    Designer client or network. I suggest you refer to the following steps to troubleshoot the issue.
    1. Use SharePoint Designer to open another site and check whether it is successful.
    2. When you are prompted to enter Office 365 account and password, try other users’ accounts and select the remembering the credential.
    3. Perform the connection procedure under another environment and verify whether the issue is resolved.
    If the issue persists, can you provide related screenshots for further troubleshooting?
    Best Regards,
    Lisa Chen
    Lisa Chen
    TechNet Community Support

  • My ipod id destroyed! it wont turn on probly cause it is broken, like the screens are off of it but still a little connected. i am wanting to get my information, like my contacts offo fo it how do i do it?

    my ipod id destroyed! it wont turn on probly cause it is broken, like the screens are off of it but still a little connected. i am wanting to get my information, like my contacts off of it, and onto a computer.how do i do it?

    If iTunes can't see the iPod then your only hope is a data recovery company.
    However, if the info is in an iPod backup you can restore another iPod, iPad or iPhone from that backup

  • Similar to connecting to remote computer using WSManagement, how to do it through powershell terminal?

    I have the following code to connect to the remote powershell and execute script on remote machine :WSManConnectionInfo connectionInfo = new WSManConnectionInfo(false, "MachineName", 5985, "/wsman", shellUri, credential);
    using (Runspace runspace = RunspaceFactory.CreateRunspace(connectionInfo))
    runspace.Open();
    using (PowerShell powershell = PowerShell.Create())
    powershell.Runspace = runspace;
    String file = @"C:\scripts\createUser.ps1";
    powershell.Commands.AddScript(System.IO.File.ReadAllText(file));
    Collection<PSObject> results = powershell.Invoke();
    }How to execute the script in same way from powershell command prompt?

    Hi,
    The Invoke-Command cmdlet should to the trick for you using WinRM.
    Invoke-Command -ComputerName MachineName -Scriptblock {c:\scripts\createuser.ps1}
    The parameter -File could also be used for pointing to an UNC share or so.
    More information regarding the cmdlet is found below..
    http://technet.microsoft.com/en-us/library/hh849719.aspx
    Microsoft Certified Trainer
    MCSE: Desktop, Server, Private Cloud, Messaging
    Blog: http://365lab.net

  • Connecting to Remote Computer

    Does Mac have the capability to connect to a Windows based remote computer? For example, I'm planning on purchasing a MacBook Pro soon and I need to know if I will be able to connect remotely to my office computer which is Windows based.
    Any help would be great.

    The answer depends. Can you currently connect using another computer today?
    If you can, then you should be able to connect with your Mac.
    Microsoft offers Remote Desktop Connection client for Mac OS X
    <http://www.microsoft.com/mac/otherproducts/otherproducts.aspx?pid=remotedesktop client>
    You can use a Mac VNC client, such as Chicken of the VNC, to connect to a VNC server on your Windows system, such as TightVNC.
    LogMeIn.com allows remotely connecting to PCs from Macs via a browser such as Safari. You would have to run the LogMeIn server on your PC.
    There are other services that allow you to connect Macs and PC over the internet.
    However, many times computers systems at work are behind firewalls that block incoming connections. Companies that do allow remote access often times require the use of VPN software. Depending on the VPN being used, there may or may not be a Mac client. My company uses a Cisco VPN server and provides employees with the Mac Cisco VPN client.

  • JDBC connect from remote computer fails

    Hi all,
    I have successfully installed the XE server and I can connect over JDBC from clients running locally on the machine where the XE server is installed.
    However when I try to connect from a remote computer using the same client I get an error saying: The Network Adapter could not establish the connection
    I can ping the machine with XE installed and all firewalls on the machines are turned off.
    Any ideas on the subject of JDBC remote connect to XE server? Or is it simply that it is not supported?
    Appreciate all the help I can get.
    Thanks,
    /Anders

    On my machine I have the listener bound to local interface.
    Listener.ora has hostname in it, and this is the listener status:
    As status shows the hostname is resolved to localhost, on this machine I am unable (with this configuration) to share the db to other machines (I do not have oracle client on my other pc, but telnet is unable to connect to port 1521).
    Changing hostname to ipaddres solves.
    [andrea@bones ~]$ lsnrctl status
    LSNRCTL for Linux: Version 10.2.0.1.0 - Beta on 15-DEC-2005 21:28:51
    Copyright (c) 1991, 2005, Oracle.  All rights reserved.
    Connecting to (DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=bones)(PORT=1521)))
    STATUS of the LISTENER
    Alias                     LISTENER
    Version                   TNSLSNR for Linux: Version 10.2.0.1.0 - Beta
    Start Date                15-DEC-2005 21:28:40
    Uptime                    0 days 0 hr. 0 min. 11 sec
    Trace Level               off
    Security                  ON: Local OS Authentication
    SNMP                      OFF
    Default Service           XE
    Listener Parameter File   /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/admin/listener.ora
    Listener Log File         /usr/lib/oracle/xe/app/oracle/product/10.2.0/server/network/log/listener.log
    Listening Endpoints Summary...
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=1521)))
      (DESCRIPTION=(ADDRESS=(PROTOCOL=tcp)(HOST=localhost.localdomain)(PORT=8080))(Presentation=HTTP)(Session=RAW))
    Services Summary...
    Service "PLSExtProc" has 1 instance(s).
      Instance "PLSExtProc", status UNKNOWN, has 1 handler(s) for this service...
    Service "XE" has 1 instance(s).
      Instance "XE", status READY, has 1 handler(s) for this service...
    Service "XEXDB" has 1 instance(s).
      Instance "XE", status READY, has 1 handler(s) for this service...
    Service "XE_XPT" has 1 instance(s).
      Instance "XE", status READY, has 1 handler(s) for this service...
    The command completed successfully
    [andrea@bones ~]$

  • Telnet cannot connect to Remote Computer

    When I telnet my localhost it works completely fine..
    But It's not able to connect to Remote Host
    It says Unable to Connect to Remote Host, Operation Timed Out
    But my Remote Laptop is able to connect to this system perfectly...
    I don't understand where's the issue.
    Any Help ??

    Do you mean, you can access the target computer using the other computer and not the
    one you’re on right now? Can you ping the target computer using that computer
    and vice versa? Just make sure that the computers are pinging each other to
    ensure that they are communicating.

  • Ethernet connection between remote computer and remote ax

    My wireless system is Time capsule connected to the cable modem. Airport Express connects through the wireless network created by TC. My G5 is connected to the AX by ethernet. Initially the G5 was able to connect to the internet by the ethernet connection. I attempted to connect my MacBook but I was unsuccessful. Any help would be appreciated.
    Thanks,
    Gordon

    Solved the problem. The wireless network has to be setup as a WDS network in order to connect a remote device by ethernet to a remote TC, AExp, or AExt.

  • How to connect to remote computer using ARD and AE

    Does anyone have detailed instructions on how I can us my AirPort Extreme and setup all the ports to allow the use of ARD remotely?

    You can configure your AirPort Extreme for ARD using the AirPort Utility. ARD is one of the choices under Port Mapping.
    You get to the port mapping option, as follows:
    Run the AirPort Utility.
    Select the AirPort Extreme, and then, select Edit.
    Select the Network tab to enable it.
    Click on the "+" button under the Port Settings field.
    Click on the drop-down arrow to the right of the Description field. (see image below)
    Select Apple Remote Desktop. This will automatically populate the other fields on the page.
    Select Save, and then, select Update.
    Allow the base station to reset.

  • Cannot connect to remote computer

    Hi all, I've spent a lot of time trying to figure this out, would appreciate any help as I'm new to ARD, (3.3.2 version).
    Here goes... I have 5 Macs on my home network, and have had very little problem connecting and controlling them from ARD. My problems start when I try to connect to my not-to-computer-savvy relatives elsewhere.
    The first one is running a new iMac behind an airport extreme, I have ticked thier Remote Management box and opened the ARD ports on the extreme and I think I have correctly set up a static IP address of 10.0.1.3, on the 'configure IPv4' 'using DHCP with manual address'. I have then asked that user to give me his IP address from 'http://www.myipaddress.com' and this is the address I type into ARD - Scanner - Network Address. However this will not work, I cannot 'see' them or let me verify the user when I try to 'control' of 'observe'.
    The second computer is behind a 'Linksys WAG 54G2', so I'll need to forward the ports like this.. http://portforward.com/english/routers/portforwarding/Linksys/WAG54G2/Apple_RemoteDesktop.htm
    I have also tried to 'Ping' without success both these computers using 'Network Utility'
    Very frustrated. Any help appreciated.
    Max

    Do you mean, you can access the target computer using the other computer and not the
    one you’re on right now? Can you ping the target computer using that computer
    and vice versa? Just make sure that the computers are pinging each other to
    ensure that they are communicating.

  • SSH tunneling to connect to remote computer

    Hi,
    I have to connect to my remote database(RHEL box) from a windows using SSH tunnel
    1. I have set up the SSH tunneling(with outgoing tunnel)
    2. I have made a entry in the TNSnames.ora file
    3. I establish connection to the remote server using SSH client and when i do tnsping
    i do get connection. Even when i change the host name to some unkown name i do get a tnsping but iam not able to connect to the database. do iam wrong anywhere
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ISIL-PRJ
    -04)(PORT = 1523)) (CONNECT_DATA = (SID = ora1022b)))
    OK (800 msec)
    Used TNSNAMES adapter to resolve the alias
    Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ISIL-PRJ
    -04)(PORT = 1523)) (CONNECT_DATA = (SID = blablabla)))
    OK (800 msec)
    even when i change my sid name i get a tnsping. can anybody explain

    Hi,
    Looking for this schema below and see if help you:
               Secure Connection
       +---->-------[SSH]-------->-----+
       |                               |
       |                               |
       ^                               |
       |       Insecure Connection     v
    CLIENT---->--------------------> ORACLE
    ssh2 -l oracle -L 1521:192.148.1.251:1521 200.10.11.12
                        |          |                |
                        |          |                |
                   A  LOCAL        |                |
                   B       INTERNAL IP ORACLE       |
                   C                       EXTERNAL IP (GATEWAY)
                                                         C                             B
          | Firewall| . . . . .|INTERNET| . . . . . . |Firewall| . . . . . . . . . . |ORACLE|
          | Gateway |                                 |Gateway |                 192.148.1.251:1521
               .                                     200.10.11.12                                  
         A     .
       |Oracle Client|
       (TNSNAMES.ORA)
         <SERVICE> =
           (DESCRIPTION =
             (ADDRESS_LIST =                     
               (ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
             (CONNECT_DATA =
               (SID = <SID>)
           )Cheers

  • My IPod Clasic will sometimes display the error "lost connection" when it's being used, but not when connected to my computer.  Any ideas?

    This does not happen when connected to a docking device or computer, only when it is being used with headphones.  If I reboot, it's fine, but it does happen again.

    Have  discovered that I had not in fact updated the ios!!
    Went through the process last night and my ipod now works fine on my docking station.
    Thank you very much for your advice.

  • Because of a protocol error this session will be disconnected. Please try connecting to remote computer again.

    I have one user who continues to receive this error every time he try's to RDP to this server Windows Server (2008) Enterprise SP2. No other users receive this error when they RDP to the server.
    I used this workaround...
    Windows Server 2008 (SP1 or SP2)
    1. Logon to the Terminal Services computer as an administrator
    2. Start--Run gpedit.msc, click Continue if prompted by UAC
    3. In the left pane, under Computer Configuration, navigate to following:
    Administrative Templates\Windows Components\Terminal Services\Terminal Server\Remote Session Environment
    4. In the right pane, double-click on Set compression algorithm for RDP data
    5. Select Enabled, and choose Balances memory and network bandwidth
    6. Click OK to save the change
    This did not resolve my issue.

    Hi,
    Glad to hear that you have resolved your issue. 
    Thank you for sharing your experience here. It will be very beneficial for other community members who have similar questions. 
    If you want any more solution in future, kindly place your post in Forum.
    Regards,
    Dharmesh

  • I tried to update my phone and it shut off and said I need to plug it into a computer for itunes and I dont have a computer to connect it to. My phone wont turn on either and I can't use it until I connect to a computer.

    Phone says i need to connect to itunes but dont have a computer???

    Two options. Create a guest user on the computer and there will not be any content on the "guest" iTunes. Or if unable to do that set up the iPhone as New. Do not subsequently synch the phone.
    Third option is to take the phone to the Genius Bar at an Apple store.

Maybe you are looking for

  • Match user name (login name) and token

    Hi, I have setup the VDI 3.1 POC evaluation using VMware. It is all working great. I had 2 other requirements put forth by management: 1) The Windows desktops had to lock the screen when a user removed his/her smart card 2) The card and the user had

  • Removing hidden directories from Project Navigator

    Hi everyone, I've searched the forums and even googled it... but couldn't find any answers. I'm using subversion and it creates hidden file directories for my project, but when I use FlexBuilder, I see these directories in the Project Navigator. Is t

  • New camera format not recognized/Adobe Updater will not update

    I bought a new camera (Canon Mark 5D III). I am trying to use my laptop (Mac Air/Lion) with Photoshop CS3 (although I have upgrades, I cannot upgade to CS5.5 or 6 because it will just drag my system down, worse than it is limping along already with L

  • Logout button and Page submission problem

    {color:#000080}Hi All, We have logout buttons on every page of our application. The problem is that if the user clicks on any part of the page, even on the group-panel, the logout button gets the focus and a hit on the enter key causes the user to lo

  • Itune wifi woes...need help!!

    Help please!! My iphone is hooked up to my wifi....I can go online, check mail and surf web etc. But when I try to connect to itunes, I get a message that says "cannot connect to the itunes store" telling me I must connect to a wifi network. Whassup?