Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save JamesDBartlett3/82e3889f4dc741b4e1109595b0752d6c to your computer and use it in GitHub Desktop.
Save JamesDBartlett3/82e3889f4dc741b4e1109595b0752d6c to your computer and use it in GitHub Desktop.
Copy 'Server:Port' Connection String to Clipboard {Power BI External Tool}
{
"version": "0.0.3",
"name": "Copy Server:Port",
"description": "Copies the currently connected Sever name and Port number from Desktop onto your clipboard. Format of the copied connection string is of 'server:port'.",
"path": "C:\\windows\\System32\\mshta.exe",
"arguments": "vbscript:Execute(\"CreateObject(\"\"Wscript.Shell\"\").Run \"\"powershell.exe -NoLogo -Command \"\"\"\"& {'%server%' | Set-Clipboard}\"\"\"\"\"\", 0 : window.close\")",
"iconData": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAPwAAAD7CAYAAABOrvnfAAAACXBIWXMAAAsSAAALEgHS3X78AAAKXUlEQVR4nO3dT2iUdx7H8W8yMaOJJkYIKESqCB50aVZv20vFXPS04kGPWoh71aXeHtotXeZWqJ4N1KuFbd2THoq6F10QrIXqoSDTrgG7BI07NtHJv1l+j5mlXf8+kzwz39/zeb9A8BL9ZWbe8zy/md/z/LoajYYB0NDN8wzoIHhACMEDQggeEELwgBCCB4T0ZP1VkyT5hBcI2uxapVK5xoO+cpm/h0+ShC/u0Ql/rlQqZ3jkV4ZTesTi8yRJzvNsrQxHeMTmOzPbV6lUHvPMZccRHrEZNbMfkyT5Pc9cdgSPGA2a2bdJkhzn2cuG4BGzL5jXZ8McHkXwDzM7xLz+zTjCowjeN7PbzOvfjOBRFO+EBTrM61+P4FEkg8vzehbovAJzeBTV383sOPP638o9+P3797c8OBTfrVu37PHj3Jr8bjn627yUnst88UxWY2Njef8XiFi1Ws0z+NHmvL5SqVzkdcIcHsUX5vVfc5XncwQPFX8Ji3SSJNmo/IwTPJQcWz7F36b6rBM81IwuL9LZp/jMEzwUhXn91SRJTqn97gQPZXI31SB4qDuWJMltlQ/zCB4QuqkGwQPPSdxU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R2h4tnnuQ2NiAWUV0tF06P1mw6kP7JojxfNbOJTg8f6Di+hweEEDwghOABIQQPCCF4QAjBA0IIHhBC8IAQggeEEDwghOABIQQPCCF4QAjBA0IIHhBC8IAQggeEEDwghOABIQQPCCF4QAjBA0IIHhAS1X3pYzX/6HK6eUbYRAPFV+r7nfX072arKTWLM3ds5t7JKPfFQ+sWajesnm4m+bH17zibeeOUPHFKn5MQ+5O7h4ldWNgH8ZcfPkg3E/WC4HMSjuwxbnyJ1Tdz75SbnYMJPgdhzs6RHb8Wdj/2gOBzMDd9qXC/E1bGywe2BJ8DL6dv8GOpPuliLAQPCCH4HPQMvFe43wkrU+rb7eIRJPgc9A4dLNzvhJUpDx918QgSfA5K6SorP4st0Fnd5RHrdRJ87ivtkiTJ+79wKaywYuENukoDtn7neTdLbDnC5yQ8wQPvfmNrRz5Mn3To6R0+YoN7bqZnfF6wlj5n60ZOp3+4cEZLuIDG24UzRvDtwyf38IBTekAIwQNCCB4QQvCAEIIHhBA8IITgASEEDwjJvPCmUql0xfbwJEmyz8yuOhgK0FEc4QEhBA8IIXhACMEDQggeEELwgBCCB4QQPCCE4AEhBA8IIXhACMEDQggeEELwgBCCB4QQPCCE4AEhBA8IIXhACMEDQggeEELwgBCCB4QQPCCE4AEhmXeeUVCtVsNuNeoPAwqIIzwghOABIQQPCCF4QAjBA0IIHhBC8IAQggeEEDwghOABIQQPCOlqNBo834AIjvCAEIIHhBA8oMLM/gv+XsF1rKLr4gAAAABJRU5ErkJggg=="
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment