How would one go about opening an existing TFS query using powershell, more specifically the nuget console in VS (2013)?
I have to open several queries each time I open VS, and it would make life much easier to do so via a simple powershell cmdlet.
Thanks!
-k
Please check the post here which uses tfpt.exe inside powershell scripts to run the TFS queries.
Related
I'm trying to figure out if I can launch a pre-built Alteryx workflow without launching the Designer - and without having Alteryx Server.
I came across a helpful post on Alteryx uses by #Runonthespot that, among other things, addressed running workflows from the command line, but doesn't go into detail. That discussion is here: https://stackoverflow.com/a/30469848/4313331. I don't have the rep to comment on his post and the question is closed.
He writes:
"Flows are runnable from the commandline on a server, and easiest way I've found (besides using Alteryx's own scheduler) is to save as an "App", and then run from the command line using the Alteryx engine executable, passing it parameters via xml file. You can save a sample xml parameter file from your flow by hitting the magic wand button (after saving the flow as a .yxwz (app)) This brings up a panel that lets you set the variables, and that panel has a handy "save" button which generates an xml file in the right format."
So, I'm looking for more info on this process. Is it simply a question of using Alteryx Server? Or is this a more interesting work around?
Thanks.
Yes, you can run a workflow (used generally to refer to a workflow, macro, or analytical app) without launching the Designer. You'll first need to understand how to run the workflow from the command line. The AlteryxEngineCmd.exe executable runs a workflow. It is located in the Alteryx install path in the bin subfolder. Here is where mine is located:
C:\Program Files\Alteryx\bin
It allows an additional parameter of an XML file with interface values. This is documented for analytical apps ONLY though it does work for macros as well. This is based on my extensive use of this undocumented feature.
Below are two examples:
AlteryxEngineCmd.exe MyWorkflow.yxmd
AlteryxEngineCmd.exe MyAnalyticApp.yxwz AppValues.xml
You can see a post here:
Alteryx Command Line Help
I prefer to wrap the command in a batch file and execute that for more control.
Now that you understand how to run the workflow from the command line, you can execute it anytime you want without launching Designer. Furthermore, you can use Windows Scheduler or a third-party tool to run the command or the batch file on a schedule.
Finally, you do need a license which enables API & Command Line w/ Scheduler. This is less expensive than Alteryx Server.
Have you tried C:\Program Files\Alteryx\bin\AlteryxEngineCmd.exe? It doesn't require server.
https://help.alteryx.com/2019.1/Command_Line.htm
If restrained by budget, you don't need a scheduler license (enables the AlteryxEnginecmd.exe), you can use a windows mouse clicker or even Powershell, to run the Designer though, without manual intervention.
I'd like to checkout a file under a different username using powershell's tfs snapin. Except, I don't see a login or user switch when I lookup Add-TfsPendingChange.
Is there a way of doing this?
I'd rather not switch between the snapin and the cmd line versions if possible. Shouldn't need to do that anyway.
TFS power-shell snapin use the credential which is entered when create the workspace and only provide basic version control commands feature. Call "tf.exe" in powershell script directly would be an easy way to achieve the feature you want. If you don't like this method, you can involve TFS API in your powershell script. Refer to "Beyond the basics" in this link for details: PowerShell and TFS: The Basics and Beyond.
I am proposing an idea for a final year project that is basically a virtual environment. I would be using Citrix XenServer in conjunction with Windows Server 2008 R2 and Citrix netscaler to make the server accessible over the web. I would also be hosting a website on the server that Windows is on.
What I was wondering is, would it be possible to trigger the execution of a script on the server from the web page. So basically a user comes along, goes to my website, registers their details. a csv file is then produced based on the details that are input. Then I was wondering is there a way to trigger the execution of a powershell script that would use the csv file to set up the user in Active directory. The powershell script itself is simple its just how I would get it to run is another thing.
Yes it is possible.
PowerShell lets us create graphical interfaces with the .NET winforms. With it, we can build front end to manage our scripts. It's a really nice feature, and tools like AdminScriptEditor make it pretty easy.
I have found this link for your reference - PowerShellOnWebPage
You can tweak/create the script as per your need.
Let me know if this helps.
Thanks!
I've created a custom Powershell provider. However, currently there are a few steps people have to do to get it working on a user's computer:
configure Powershell to run against .Net 4 (add a config file in c:\Windows\System32\WindowsPowerShell\v1.0)
add a custom formatter (to the System32 for c:\Windows\System32\WindowsPowerShell\v1.0).
register the snap-in.
The remainder setup steps are completed by a custom powershell script.
I was wondering if anyone could share their experiences on simplifying the process. Ideally I'd like people to run from a single command (ideally a CommandLet that's completes all the above steps.
Has anyone got any Links or Suggestions or Best Practise they could share?
I've found the following snippets that may help.
VS Command prompt variables
For the Visual Studio Command you could try Lee Holmes' http://poshcode.org/2176 or the Powershell Communit extensions (PSCVX). Both from https://superuser.com/questions/104868/run-visual-studio-command-line-tools-in-windows-powershell.
After that it's just the formatter and/or registering the snap-in.
Configure Powershell to use .Net4
How can I run PowerShell with the .NET 4 runtime?
This document describes how to get the Annotation of a file from TFS: http://msdn.microsoft.com/en-us/library/bb385979.aspx
I am interested in obtaining the Annotation of a file using PowerShell. Any ideas if this is possible and if so, how one would go about doing it?
Since you can run normal MSDOS commands in PowerShell, I'd recomment installing the Team Foundation PowerTools from:
For 2008:
http://www.microsoft.com/downloads/en/details.aspx?FamilyId=FBD14EEA-781F-45A1-8C46-9F6BA2F68BF0&displaylang=en
For 2010:
http://visualstudiogallery.msdn.microsoft.com/c255a1e4-04ba-4f68-8f4e-cd473d6b971f
Using "tfpt annotate" and parsing the output.
Grant Holiday talks about automating the process here is you want to pass the whuffie on:
TFS annotate/blame summary report for a project
PsTFS from Codeplex is a set of PowerShell commands to manage and use Team Foundation Server. May it help I don't test it.