forked from DeploymentBunny/Files
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0a88ccd
commit cb29257
Showing
1 changed file
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,39 @@ | ||
Function Connect-VIARDP { | ||
<# | ||
.Synopsis | ||
Connect-VIARDP | ||
.DESCRIPTION | ||
Connect-VIARDP | ||
.EXAMPLE | ||
Connect-VIARDP -Connection SERVER01 | ||
.NOTES | ||
Created: July 15, 2016 | ||
Version: 1.0 | ||
Updated: Nov 25, 2016 | ||
Version: 1.1 | ||
Author - Mikael Nystrom | ||
Twitter: @mikael_nystrom | ||
Blog : http://deploymentbunny.com | ||
Disclaimer: | ||
This script is provided 'AS IS' with no warranties, confers no rights and | ||
is not supported by the author. | ||
.LINK | ||
http://www.deploymentbunny.com | ||
#> | ||
Param | ||
( | ||
[Parameter(Mandatory=$true, | ||
ValueFromPipelineByPropertyName=$true, | ||
Position=0)] | ||
$Connection | ||
) | ||
do | ||
{ | ||
$ConTest = (Test-NetConnection -ComputerName $Connection -CommonTCPPort RDP).TcpTestSucceeded | ||
} | ||
until ($ConTest -eq "True") | ||
mstsc.exe /v:$Connection | ||
} |