Quantcast
Channel: /r/powershell – How to Code .NET
Viewing all articles
Browse latest Browse all 8793

Using one parameter on many commands at once

$
0
0

Hello,

I’m pretty new with powershell and am interested to find out is it possible to make it use same parameter only written once for many commands. example –

Get-ConnectionCheck -Computername NAME; Get-DiskSize -Computername NAME; Get-HPHealthStatus -Computername NAME; Get-Uptime -Computername NAME

This above command works fine, but i want to write “-computername NAME” only once, is that possible?

Thanks.

submitted by /u/iPas
[link] [comments]

The post Using one parameter on many commands at once appeared first on How to Code .NET.


Viewing all articles
Browse latest Browse all 8793

Latest Images

Trending Articles



Latest Images