Powershell get-content join ping

Welcome Forums General PowerShell Q&A Powershell get-content join ping

Viewing 1 reply thread
  • Author
    Posts
    • #219762
      Participant
      Topics: 1
      Replies: 0
      Points: 12
      Rank: Member

      I have a CSV file with 2 column (drive letters, server name).  I would like to ping each server to verify if the drive letter is a shared drive or not.  May there be a creative PowerShell method to join \\<servername>\<drive letter> so I could then ping and verify if it resolves valid or not valid path?

    • #219780
      Participant
      Topics: 4
      Replies: 2247
      Points: 5,484
      Helping Hand
      Rank: Community MVP

      Brian, welcome to Powershell.org. Please take a moment and read the very first post on top of the list of this forum: Read Me Before Posting! You’ll be Glad You Did!.

      This forum is for scripting questions rather than script requests. We do not write customized and ready to use scripts or solutions on request.

      If you already have code you wrote and it just does not what you expect or returns error you should share this code here and we might be able to help. If you post code or error messages or sample data or console output format it as code using the code tags “PRE“, please. Thanks in advance.

      If you’re just asking how to join two pieces to a valid path you can use Join-Path. To test if a given path atually exists you can use Test-Path. Please always read the complete help including the examples for the cmdlets you’re about to use to learn how to use them. 😉

Viewing 1 reply thread
  • You must be logged in to reply to this topic.