Find print server on which a printer is installed using powershell in Domain











up vote
0
down vote

favorite












I need to quickly find out the server on which a printer is installed in my Domain. There are 12 print servers with more than 50 printers on each. I used fol command but I get error



PS C:>Get-Printer -Name "PayRoll_Sec_ptr"


But this command give me result only when used on the particular server on which the printer is installed. That means I have to write it on 12 servers (or till I get the server where the printer is installed"



When I used this command on my AD Role computer. it says



the term "get-printer" is not recognized as the name of a cmdlet, function, 

script file, or operable program.









share|improve this question


























    up vote
    0
    down vote

    favorite












    I need to quickly find out the server on which a printer is installed in my Domain. There are 12 print servers with more than 50 printers on each. I used fol command but I get error



    PS C:>Get-Printer -Name "PayRoll_Sec_ptr"


    But this command give me result only when used on the particular server on which the printer is installed. That means I have to write it on 12 servers (or till I get the server where the printer is installed"



    When I used this command on my AD Role computer. it says



    the term "get-printer" is not recognized as the name of a cmdlet, function, 

    script file, or operable program.









    share|improve this question
























      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      I need to quickly find out the server on which a printer is installed in my Domain. There are 12 print servers with more than 50 printers on each. I used fol command but I get error



      PS C:>Get-Printer -Name "PayRoll_Sec_ptr"


      But this command give me result only when used on the particular server on which the printer is installed. That means I have to write it on 12 servers (or till I get the server where the printer is installed"



      When I used this command on my AD Role computer. it says



      the term "get-printer" is not recognized as the name of a cmdlet, function, 

      script file, or operable program.









      share|improve this question













      I need to quickly find out the server on which a printer is installed in my Domain. There are 12 print servers with more than 50 printers on each. I used fol command but I get error



      PS C:>Get-Printer -Name "PayRoll_Sec_ptr"


      But this command give me result only when used on the particular server on which the printer is installed. That means I have to write it on 12 servers (or till I get the server where the printer is installed"



      When I used this command on my AD Role computer. it says



      the term "get-printer" is not recognized as the name of a cmdlet, function, 

      script file, or operable program.






      windows powershell printing dns






      share|improve this question













      share|improve this question











      share|improve this question




      share|improve this question










      asked Nov 8 at 2:58









      jaykio77

      116214




      116214
























          1 Answer
          1






          active

          oldest

          votes

















          up vote
          2
          down vote













          the Get-Printer cmdlet is one of the many that are not on earlier OSs. for instance, it is not available on win7ps5.1 at all.



          you may want to use the CIM cmdlets to make the calls from your workstation. this ...



          Get-CimInstance -ClassName CIM_Printer -ComputerName 'LocalHost', '127.0.0.1'


          will get the printers from the systems listed. you can feed it a list in the -ComputerName parameter to get info from all your print servers.



          while it seems unlikely, you can use the WMI version of that command if you need to run it on a ps2.0 system.






          share|improve this answer





















          • I need to find a specific printer from a list of print servers and I need to find it out through port. I usually don't have share names for printers just an Ip and I have to find out the server where it is installed. appreciated please
            – jaykio77
            Nov 8 at 3:31












          • the returned info contains both a .ShareName and a .PortName parameter. i don't have any shared printers - just one win7ps5.1 computer and a USB printer - so i cannot test to see if the .PortName contains the IP. i suspect that it does, tho. have you tried it? [grin]
            – Lee_Dailey
            Nov 8 at 14:39











          Your Answer






          StackExchange.ifUsing("editor", function () {
          StackExchange.using("externalEditor", function () {
          StackExchange.using("snippets", function () {
          StackExchange.snippets.init();
          });
          });
          }, "code-snippets");

          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "1"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          convertImagesToLinks: true,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: 10,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });














          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53200918%2ffind-print-server-on-which-a-printer-is-installed-using-powershell-in-domain%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          1 Answer
          1






          active

          oldest

          votes








          1 Answer
          1






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          up vote
          2
          down vote













          the Get-Printer cmdlet is one of the many that are not on earlier OSs. for instance, it is not available on win7ps5.1 at all.



          you may want to use the CIM cmdlets to make the calls from your workstation. this ...



          Get-CimInstance -ClassName CIM_Printer -ComputerName 'LocalHost', '127.0.0.1'


          will get the printers from the systems listed. you can feed it a list in the -ComputerName parameter to get info from all your print servers.



          while it seems unlikely, you can use the WMI version of that command if you need to run it on a ps2.0 system.






          share|improve this answer





















          • I need to find a specific printer from a list of print servers and I need to find it out through port. I usually don't have share names for printers just an Ip and I have to find out the server where it is installed. appreciated please
            – jaykio77
            Nov 8 at 3:31












          • the returned info contains both a .ShareName and a .PortName parameter. i don't have any shared printers - just one win7ps5.1 computer and a USB printer - so i cannot test to see if the .PortName contains the IP. i suspect that it does, tho. have you tried it? [grin]
            – Lee_Dailey
            Nov 8 at 14:39















          up vote
          2
          down vote













          the Get-Printer cmdlet is one of the many that are not on earlier OSs. for instance, it is not available on win7ps5.1 at all.



          you may want to use the CIM cmdlets to make the calls from your workstation. this ...



          Get-CimInstance -ClassName CIM_Printer -ComputerName 'LocalHost', '127.0.0.1'


          will get the printers from the systems listed. you can feed it a list in the -ComputerName parameter to get info from all your print servers.



          while it seems unlikely, you can use the WMI version of that command if you need to run it on a ps2.0 system.






          share|improve this answer





















          • I need to find a specific printer from a list of print servers and I need to find it out through port. I usually don't have share names for printers just an Ip and I have to find out the server where it is installed. appreciated please
            – jaykio77
            Nov 8 at 3:31












          • the returned info contains both a .ShareName and a .PortName parameter. i don't have any shared printers - just one win7ps5.1 computer and a USB printer - so i cannot test to see if the .PortName contains the IP. i suspect that it does, tho. have you tried it? [grin]
            – Lee_Dailey
            Nov 8 at 14:39













          up vote
          2
          down vote










          up vote
          2
          down vote









          the Get-Printer cmdlet is one of the many that are not on earlier OSs. for instance, it is not available on win7ps5.1 at all.



          you may want to use the CIM cmdlets to make the calls from your workstation. this ...



          Get-CimInstance -ClassName CIM_Printer -ComputerName 'LocalHost', '127.0.0.1'


          will get the printers from the systems listed. you can feed it a list in the -ComputerName parameter to get info from all your print servers.



          while it seems unlikely, you can use the WMI version of that command if you need to run it on a ps2.0 system.






          share|improve this answer












          the Get-Printer cmdlet is one of the many that are not on earlier OSs. for instance, it is not available on win7ps5.1 at all.



          you may want to use the CIM cmdlets to make the calls from your workstation. this ...



          Get-CimInstance -ClassName CIM_Printer -ComputerName 'LocalHost', '127.0.0.1'


          will get the printers from the systems listed. you can feed it a list in the -ComputerName parameter to get info from all your print servers.



          while it seems unlikely, you can use the WMI version of that command if you need to run it on a ps2.0 system.







          share|improve this answer












          share|improve this answer



          share|improve this answer










          answered Nov 8 at 3:20









          Lee_Dailey

          1,02266




          1,02266












          • I need to find a specific printer from a list of print servers and I need to find it out through port. I usually don't have share names for printers just an Ip and I have to find out the server where it is installed. appreciated please
            – jaykio77
            Nov 8 at 3:31












          • the returned info contains both a .ShareName and a .PortName parameter. i don't have any shared printers - just one win7ps5.1 computer and a USB printer - so i cannot test to see if the .PortName contains the IP. i suspect that it does, tho. have you tried it? [grin]
            – Lee_Dailey
            Nov 8 at 14:39


















          • I need to find a specific printer from a list of print servers and I need to find it out through port. I usually don't have share names for printers just an Ip and I have to find out the server where it is installed. appreciated please
            – jaykio77
            Nov 8 at 3:31












          • the returned info contains both a .ShareName and a .PortName parameter. i don't have any shared printers - just one win7ps5.1 computer and a USB printer - so i cannot test to see if the .PortName contains the IP. i suspect that it does, tho. have you tried it? [grin]
            – Lee_Dailey
            Nov 8 at 14:39
















          I need to find a specific printer from a list of print servers and I need to find it out through port. I usually don't have share names for printers just an Ip and I have to find out the server where it is installed. appreciated please
          – jaykio77
          Nov 8 at 3:31






          I need to find a specific printer from a list of print servers and I need to find it out through port. I usually don't have share names for printers just an Ip and I have to find out the server where it is installed. appreciated please
          – jaykio77
          Nov 8 at 3:31














          the returned info contains both a .ShareName and a .PortName parameter. i don't have any shared printers - just one win7ps5.1 computer and a USB printer - so i cannot test to see if the .PortName contains the IP. i suspect that it does, tho. have you tried it? [grin]
          – Lee_Dailey
          Nov 8 at 14:39




          the returned info contains both a .ShareName and a .PortName parameter. i don't have any shared printers - just one win7ps5.1 computer and a USB printer - so i cannot test to see if the .PortName contains the IP. i suspect that it does, tho. have you tried it? [grin]
          – Lee_Dailey
          Nov 8 at 14:39


















          draft saved

          draft discarded




















































          Thanks for contributing an answer to Stack Overflow!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.





          Some of your past answers have not been well-received, and you're in danger of being blocked from answering.


          Please pay close attention to the following guidance:


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53200918%2ffind-print-server-on-which-a-printer-is-installed-using-powershell-in-domain%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          這個網誌中的熱門文章

          Tangent Lines Diagram Along Smooth Curve

          Yusuf al-Mu'taman ibn Hud

          Zucchini