• Skip to primary navigation
  • Skip to main content
  • Skip to primary sidebar
Think PowerShell

Think PowerShell

PowerShell for IT Pros

  • About
    • Who I Am
    • Why I Blog
    • Privacy Policy
  • Resources
    • More PowerShell Sites
    • Post Series Index
  • Get Help
  • Show Search
Hide Search

General

PowerShell Replacements for ‘ipconfig’ Client DNS Functions

Aaron Rothstein · February 29, 2016 · Leave a Comment

Screenshot of ipconfig DNS functions.

The third post in my PowerShell Beginner series, “Daily Tasks, The PowerShell Way“. Use PowerShell to replace ipconfig‘s /registerdns, /displaydns, and /flushdns functions, and use for both local and remote computers.

ipconfig: a longtime member of the IT Pro toolbox

Much like ping, ipconfig was a frequently used command line tool for IT Pros. Whether it was getting assigned IP information, releasing and renewing DHCP leases, or investigating DNS client issues, ipconfig was quick go to troubleshooting tool. However, recent versions of Windows and PowerShell have added easy to use cmdlets to replace some of these functions. This post will take a look at the cmdlets related to the DNS client.

[Read more…] about PowerShell Replacements for ‘ipconfig’ Client DNS Functions

Configure Static IP Address or DHCP

Aaron Rothstein · February 23, 2016 · 3 Comments

Windows 10 network connections screenshot.

The second post in my PowerShell Beginner series, “Daily Tasks, The PowerShell Way“. Learn how to get network connection information and configure a static IP or DHCP using PowerShell.

Are you connected?

In my previous post we covered how to use Test-NetConnection for network connectivity troubleshooting. If you connected to a DHCP enabled network, you will likely have successful tests without any action on your part. However, if your network environment requires static configuration of IP addresses and DNS servers for servers and/or workstations, you need to configure the correct network settings for a newly provisioned computer.

[Read more…] about Configure Static IP Address or DHCP

Add Script Flexibility with Relative File Paths

Aaron Rothstein · February 15, 2016 · 11 Comments

Folder Contents Screenshot

Using relative file paths for your PowerShell script’s supporting files ensure it continues to work when the script and files get moved around. Here’s how.

Unpredictable File Paths

My first intensive use of PowerShell was for scripting software installations/configurations in SCCM packages. It seemed like every situation called for something above and beyond a straightforward MSI install.

I would develop and test the SCCM package on my local system with a sandbox VM prior to deploying in SCCM. The SCCM client would then download that package to a cached location on each individual client. From development to deployment, I couldn’t guarantee the absolute file path of my script and any supporting files would be constant. I needed my script to be able to figure out where the supporting files were in relation to itself.

[Read more…] about Add Script Flexibility with Relative File Paths

PowerShell Aliases: Save Time But Use Wisely

Aaron Rothstein · February 11, 2016 · 4 Comments

PowerShell Get-Alias result screenshot

When typing interactive PowerShell commands, some cmdlets can be lengthy. Save yourself some time by making use of a PowerShell cmdlet’s Alias.

PowerShell is designed for readability

A big PowerShell strength is its readability. Cmdlets follow a standard Verb-Noun format and avoid any acronyms that aren’t considered common knowledge. By simply looking at a command, you can quickly understand what it is intended to do.

Readability is very important when you are creating a finished script that will be reviewed, used, and updated by others. But what about when you are simply performing some interactive work from a PowerShell prompt? You can tab autocomplete a cmdlet, but that still requires a minimum amount of typing and you may need to tab through a few cmdlets before you get to the one you want. Save yourself some time and typing by using a cmdlet’s Alias.

PS C:\Users\aaron> Get-Service -DisplayName 'Windows Update'

Status     Name        DisplayName 
------     ----        ----------- 
Stopped    wuauserv    Windows Update

[Read more…] about PowerShell Aliases: Save Time But Use Wisely

Use Test-NetConnection to Replace Ping

Aaron Rothstein · February 10, 2016 · 13 Comments

Test-NetConnection results.

The first post in my PowerShell Beginner series “Daily Tasks, The PowerShell Way“, get started with PowerShell by replacing some classic but obsolete command line tools such as ping.exe, tracert.exe, and more by using Test-NetConnection.

How to start using PowerShell?

There is SO much one can do with PowerShell, often one of the questions is where to start. Why not with tasks you are likely to perform once if not multiple times daily? This is the first post in a PowerShell Beginner series aimed at highlighting tasks that you may currently be doing by GUI or old command line tools and showing how to do them the PowerShell way.

[Read more…] about Use Test-NetConnection to Replace Ping

  • « Go to Previous Page
  • Page 1
  • Interim pages omitted …
  • Page 6
  • Page 7
  • Page 8
  • Page 9
  • Go to Next Page »

Primary Sidebar

Aaron

Think PowerShell

Copyright © 2025 · Monochrome Pro on Genesis Framework · WordPress · Log in