Skip to main content

Networking

  • Chapter
  • First Online:
PowerShell for Beginners
  • 1563 Accesses

Abstract

Even in PowerShell scripts, we have some pretty awesome network functionality especially since we can leverage the .Net framework and all of its helper objects. We can write scripts to open ports, connect to them, and send and receive messages. Writing a multiplayer game in PowerShell would certainly prove your knowledge and make all of your colleagues jealous of your ninja skills. In this chapter, we are going to start by writing a very simple server script that will open a port and listen for new connections and pick up new messages it receives. We will then write a client script that will read a line of input from the user and send it to the server script to be displayed to the console. From these basic beginnings, you will have the foundations to write any networking script you require from a small web server or chat messaging system through to multiplayer games.

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

eBook
USD 16.99
Price excludes VAT (USA)
  • Available as EPUB and PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 16.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints and permissions

Copyright information

© 2021 The Author(s), under exclusive license to APress Media, LLC, part of Springer Nature

About this chapter

Check for updates. Verify currency and authenticity via CrossMark

Cite this chapter

Waters, I. (2021). Networking. In: PowerShell for Beginners. Apress, Berkeley, CA. https://doi.org/10.1007/978-1-4842-7064-6_16

Download citation

Publish with us

Policies and ethics