You've already forked SharedScripts
mirror of
https://github.com/jaapbrasser/SharedScripts.git
synced 2025-12-24 21:51:38 +02:00
Removed bug in Connect-Mstsc
This commit is contained in:
@@ -70,8 +70,8 @@ Sets the /h:<height> parameter on the mstsc command: Specifies the height of the
|
||||
.NOTES
|
||||
Name: Connect-Mstsc
|
||||
Author: Jaap Brasser
|
||||
DateUpdated: 2016-06-02
|
||||
Version: 1.2.3
|
||||
DateUpdated: 2016-10-28
|
||||
Version: 1.2.4
|
||||
Blog: http://www.jaapbrasser.com
|
||||
|
||||
.LINK
|
||||
@@ -192,8 +192,10 @@ An remote desktop session to server01 will be created using the credentials of c
|
||||
}
|
||||
|
||||
if ($Credential) {
|
||||
$User = $Credential.UserName
|
||||
$User = $Credential.UserName
|
||||
$Password = $Credential.GetNetworkCredential().Password
|
||||
} else {
|
||||
$Password = [System.Runtime.InteropServices.Marshal]::PtrToStringAuto([System.Runtime.InteropServices.Marshal]::SecureStringToBSTR($Password))
|
||||
}
|
||||
}
|
||||
process {
|
||||
|
||||
@@ -723,8 +723,8 @@ param(
|
||||
#endregion
|
||||
|
||||
# Check if correct parameters are used
|
||||
if (-not $FolderPath) {Write-Warning 'Please specify the -FolderPath variable, this parameter is required. Use Get-Help .\deleteold.ps1 to display help.';exit}
|
||||
if (-not $FileAge) {Write-Warning 'Please specify the -FileAge variable, this parameter is required. Use Get-Help .\deleteold.ps1 to display help.';exit}
|
||||
if (-not $FolderPath) {Write-Warning 'Please specify the -FolderPath variable, this parameter is required. Use Get-Help .\deleteold.ps1 to display help.';exit}
|
||||
if (-not $FileAge) {Write-Warning 'Please specify the -FileAge variable, this parameter is required. Use Get-Help .\deleteold.ps1 to display help.';exit}
|
||||
if (-not $LogFile) {Write-Warning 'Please specify the -LogFile variable, this parameter is required. Use Get-Help .\deleteold.ps1 to display help.';exit}
|
||||
if ($Autolog) {
|
||||
# Section that is triggered when the -autolog switch is active
|
||||
|
||||
Reference in New Issue
Block a user