Skip to content

Instantly share code, notes, and snippets.

View marlusantos's full-sized avatar
🏠
Working from home

marlu marlusantos

🏠
Working from home
View GitHub Profile
@marlusantos
marlusantos / 3.1.1_Static_Parameters.ps1
Last active October 5, 2016 15:18
PowerShell v4.0 for the IT Professional Part 2
break
Test-NetConnection -ComputerName 2012r2-dc -Port 389
Test-NetConnection -ComputerName 2012r2-dc -Port 5000
Measure-Command -Expression {Test-NetConnection -ComputerName 2012r2-dc -Port 389}
Measure-Command -Expression {Test-NetConnection -ComputerName 2012r2-dc -Port 5000}
$tcp = New-Object System.Net.Sockets.TcpClient
$tcp | gm
function Test-Parameters
{
[CmdletBinding()]
Param
(
#-----------------------
# Parametro MachineName
#-----------------------
# Atributo [Parameter] + Argumentos