PowerShell: Excute Function Remotely
$computername=$env:computerName $adminUsername='doeMainAdmin' $adminPassword='frackingPassword' $adminCredential=New-Object -TypeName System.Management.Automation.PSCredential -ArgumentList $adminUsername,$(ConvertTo-securestring $adminPassword -AsPlainText -Force) function execFunctionRemotely{ param( [Parameter(Mandatory=$true)][string]$computerName,…
0 Comments