Functions/Public/Start-MSRA.ps1
<#
.SYNOPSIS Starts Microsoft Remote Assistance .DESCRIPTION This function is set to work with the helpdesk mode of Windows Remote Assistance. You can either enter a computer name and the function will attempt to start a connection to the remote computer. If no computer name is specified Windows Remote Assistance will open to the Advanced Help Desk Mode, which is where you can enter a computer name to connect to. .PARAMETER ComputerName This parameter is for the remote computer you wish to connect to. By default if you don’t specify a remote computer Windows Remote Assistant will open up to the helpdesk screen. .EXAMPLE PS C:\> Start-MSRA computer1 Description ----------- This example shows how to call the Start-MSRA function and automatically connect to the remote computer. .NOTES Author: Matthew J. DeGarmo GitHub: https://github.com/matthewjdegarmo #> Function Start-MSRA() { [CmdletBinding()] param ( [Parameter(Mandatory = $false, HelpMessage = 'This is the remote computer you wish to connect to.')] [Alias('CN')] [string] $ComputerName = "" ) If ($ComputerName -eq "") { Start-Process -FilePath "C:\Windows\System32\msra.exe" -Args "/Offerra" } Else { If (Test-Connection -ComputerName $ComputerName -Count 2 -Quiet) { Start-Process -FilePath "C:\Windows\System32\msra.exe" -Args "/Offerra \\$ComputerName" } Else { Return "Failed to Connect to $ComputerName" } } }#End Function: Start-MSRA # SIG # Begin signature block # MIIPcgYJKoZIhvcNAQcCoIIPYzCCD18CAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB # gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR # AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQUNzz7sruC4V/SYu2Q9RTexMmr # EGKgggzlMIIGXzCCBUegAwIBAgIKFf/aSAACAACzwTANBgkqhkiG9w0BAQsFADBI # MRMwEQYKCZImiZPyLGQBGRYDY29tMRcwFQYKCZImiZPyLGQBGRYHbnBwZG5ldDEY # MBYGA1UEAxMPTlBQRElzc3VpbmdDQTA0MB4XDTE4MTAwNjAxMTkwMVoXDTIwMTAw # NTAxMTkwMVowJTEjMCEGA1UEAwwaRGVHYXJtbywgTWF0dGhldyBKLi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MBEGCgmSJomT8ixkARkWA2NvbTEXMBUGCgmSJomT8ixkARkW # B25wcGRuZXQxGDAWBgNVBAMTD05QUERJc3N1aW5nQ0EwNAIKFf/aSAACAACzwTAJ # BgUrDgMCGgUAoHgwGAYKKwYBBAGCNwIBDDEKMAigAoAAoQKAADAZBgkqhkiG9w0B # CQMxDAYKKwYBBAGCNwIBBDAcBgorBgEEAYI3AgELMQ4wDAYKKwYBBAGCNwIBFTAj # BgkqhkiG9w0BCQQxFgQU0sjeyWcFrmeUVq1wfHDDNkocX40wDQYJKoZIhvcNAQEB # BQAEggEAY8W6jLFK1+55u+Cj3167X3C25yps2hUgC7+xZjPcl2za020dg7qpw/eb # Uy0b5pcOMNn0IIshmaYsGunIfEu0DMAJ60+BMG94hwy2ilGo3x/GjNb642Uh9PWS # CiWya/17rigVqDuT9ncWEKbo5KprTKOeo/s1cqj2V9Rl8/hLCoSFiutJwB9H6SYd # yyDSTzU65Z6yGg7JXt7Xztt3FcIdbyjHfXODk0S/dbVj81YQZlXYbd4RaARfALV4 # oFyjh0G3hg7L0+O08WtFXjapfDmI4era1nmfuF4EuP6zJgPw5gYUlN3jfQ83HwOR # j3waIgNwq6gPCcNRE3ztbLA66uw9sg== # SIG # End signature block |