Thank you for the amazing video. I've always used PowerShell Studio and wanted to make a change and you made that extremely easy. I also love the inclusion of the script analyser because, not sure if it's just me, but I absolutely hate coming across shared code that has aliases or shortended names for parameters.
@seangraylin3 жыл бұрын
okay so this settings.json file does not show up for me at all and I do not know why. I keep getting this error message "PowerShell does not support debugging this file type: '/Users/sean/Desktop/Test.psd1'."
@seangraylin3 жыл бұрын
@@TrevorSullivan I am not sure how else you would run the code other than pressing F5 or the run arrow. When I press F1 a search dialogue box appears and not really sure what you mean by command pallete. I seem to be getting different results for instance when you created the folder you get a settings windows with settings.json which is not something I am seeing at all. sorry if this is stupid I am not a coder but an administrator and I am just looking for a better way to look at and manage PS scripts without opening up a VM with windows to run PS ISE.
@fredflintstone505 Жыл бұрын
Your instructions for setting up an older version of PowerShell (5.1) with the latest VSCode (1.76.2) does not work. Any change on updated instructions?
@utilars4 ай бұрын
How do we setup PowerShell Extension for VSCode to use the Powershell version that comes preinstalled in MS Windows?
@TrevorSullivan4 ай бұрын
@@utilars check out the VScode settings for the extension. There's a property you can set that specifies paths to different PowerShell executables on your system
@shaundbritto3471 Жыл бұрын
i dont know if you still upload videos, i just have one request, whenever i am working on a react project and the terminal is listening to a port, the terminal works for 3 to 4 minutes and terminates with exit code 2, how to resolve, no solution found on google
@TrevorSullivan Жыл бұрын
Hey there, have you tried replicating this behavior on another system? Have you filed a bug report with the appropriate GitHub repository?
@shaundbritto3471 Жыл бұрын
@@TrevorSullivan everytime time i run js file on a port, the terminal works for 2 minutes and then The terminal process "C:\Program Files\PowerShell\7\pwsh.exe" terminated with exit code: 2148734499. This error appears, i have tried on cmd prompt, powershell all the terminals abruptly shut
@tompaget832 жыл бұрын
Trevor, you're AWESOME! This video is so very useful!
@thomasmartin92325 жыл бұрын
How do I pass in command line parameters in Visual Code to debug a PowerShell application?
@AndyHelsby7 жыл бұрын
Great tutorial - Completely new to vscode here so these tweaks are very handy. The format brace on new line doesn't seem to work for me though - the formatting is working as it automatically puts the space between the ) and { in the code but doesn't drop the { to the new line. Small detail and the rest of the tips will come in handy so thanks.
@daviwil7 жыл бұрын
Slight correction on "powerShell.startAutomatically": that setting is used to disable automatic startup of PowerShell Editor Services when a PowerShell file is opened. Some users requested this to shorten startup time when browsing PowerShell files in short-lived VS Code windows. Great video, thanks Trevor!
@daviwil7 жыл бұрын
No problem! The setting's name is a little confusing, so I blame it on myself :)
@daviesmotivation88644 жыл бұрын
sorry for late asking. i'm new here. i wanna ask why if i download something in vcs, don't have reload button. please help me.
@chamaco75006 жыл бұрын
When attempting to start the integrated Terminal in OSX I get an err: terminal process terminated with exit code: 64 I tried to use the directory of: "/usr/local/bin/powershell" but there's no powershell "executable" in this directory. I ran powershell from my MAC and found that it loads from : "/usr/local/microsoft/powershell/6.0.1/pwsh " but when I use this path I get the error
@cyborgdc50176 жыл бұрын
I get the same error. Have you found a solution to this problem?
@mikekim69666 жыл бұрын
Hi Trevor, this is really helpful. Just like invoking PS command from editor by F8 and stay focus on the editor, is there a similar way to do it in git bash shell terminal. I have a file containing a list of shell command and would like to execute one command at a time and see the execution in the bash terminal. How do I do that? Basically, i would like to run current line in the active terminal(bash). Thanks. Solved: There is a command that I created a shortcut : terminal run the selected text in active terminal..
@oliawak4 жыл бұрын
Hello Trevor, can you do a tutorial on how to connect to office 365 services? I’m getting a WSMan error in vscode on macOS. Thank you!
@simonberg56944 жыл бұрын
Hi Trevor Great video! I used this video as reference for my first try out of VS Code for Powershell. But in time the VSCode settings has changed, and i found that the AutoIndent settings has changed and is reliable of an formatter, with containing rules for AutoIndent regarding Powershell formatting guidelines. Have you stumpled on the same issue and might have an solution? Best Regards Simon Berg
@simonberg56944 жыл бұрын
Hey Trevor After starting using the VS code i found this setting "editor.autoIndent": "True" And it worked like a charm and the FormatOnSave or FormatOnTrue triggered, the formatting and the AutoIndent kicked in, when i was writing my powershell documents. So my indentation was working like a charm whenever i startet writing som code wrapped with brackets. But many updates for VS Code has arrived since, and suddenly it stopped working and now i have to set "editor.autoIndent": to one of these "Advanced, Brackets, Full, Keep or None" but neither works. Then i googled and some bloggers mentions the AutoIndent formatting rules is now dependent og the specific formatter. VS Code expects the formatter is known about the specific document code language AutoIndent rules. But i dont think Microsoft included these rules in ex. the "ms-vscode.powershell" formatter. Maybe you have seen this problem before? [settings.json] "workbench.colorTheme": "Default Dark+", "powershell.integratedConsole.focusConsoleOnExecute": false, "powershell.integratedConsole.showOnStartup": false, "powershell.enableProfileLoading": false, "powershell.codeFormatting.newLineAfterCloseBrace": true, "powershell.codeFormatting.openBraceOnSameLine": false, "powershell.codeFormatting.whitespaceAroundOperator": true, "editor.defaultFormatter": "ms-vscode.powershell", "editor.tabCompletion": "on", "editor.autoIndent": "full", "editor.formatOnSave": true, "editor.formatOnType": true, "git.enableSmartCommit": true, "git.confirmSync": false, "git.autofetch": true, "powershell.scriptAnalysis.enable": true
@GosuHub4 жыл бұрын
6:27 how do i know the path to powershell ? please answer
@jasonthurston7996 жыл бұрын
VS Code lacks some nice features of ISE. 1. In the terminal I'd like to be able to start typing parameters and have it show me a menu of available parameters. 2. I'd like to have something like the two green arrow buttons in ISE for running all code in the buffer or just select code. F8 is hard to reach accurately in the dark . 3. Not and ISE feature but since VSCode has tasks, I don't seem to be able to get a task to run against my active terminal so the task can prepare/affect my environment.
@elmuziko7 жыл бұрын
I myself am an ISE veteran, only given the size of the scripts I've wrote and the small changes I keep making I'm wanting to move to something that tracks changes. I've read a lot of docs and this is coming up trumps every time. Whilst it looks good, and I immediately feel at ease writing code - I can't for the life of me figure out how to run it? You know like in ISE you just hit the green run button? If I highlight everything and press F8 I get : Executable script code found in signature block., and the internet is being less than helpful in solving. Am I being a total jackass or is it meant to be this difficult?
@elmuziko7 жыл бұрын
Thanks for the swift response Trevor. My execution policy is unrestricted. If I hit F8 on, say, New-Item c:\test.txt -itemtype file It works fine. If I do: Test-Path C:\test.txt It works fine. If I do: IF ( ( Test-Path C:\test.txt ) -eq $FALSE ) { "No file" } Then this is when I get the error: Executable script code found in signature block I won't cry if I can't get it to work, it's just a shame because the idea of version control on my scripts would be heavenly. Quite frankly I'm surprised half of them still work given the sheer size and rubbish coding of them all!!!
@RandomTorok5 жыл бұрын
I'm with you Graham, F8 will run a selection but I want to run an entire script. I've got a script that works fine from the ISE but when I load it into VS Code I can't figure out how to run the entire script. Can someone please explain how to do a simple thing like run a script.
@issiewizzie7 жыл бұрын
whats the diff between visual studio code for mac and visual studio for mac
@NirHason7 жыл бұрын
Thank you for the video! really informative. When I mouse right-click on the script document I have the open of "Run code" (can be done also by clicking on the play button on the top right corner) it's just running the script to the 'output' window and it shows "[Running] powershell -ExecutionPolicy ByPass . . . " But it's just stays like that forever. my code includes some 'Read-Host' cmdlet so it won't ask for any input or anything. Why is that? we can't use the 'run code' option for Powershell?
@NirHason7 жыл бұрын
tnx for the answer :)
@MSMgamer1906 жыл бұрын
Thanks Trevor you've helped increase my productivity. very helpful tutorial!!
@pranjalpagaria3224 жыл бұрын
can you help me with this problem kzbin.info/www/bejne/faWxnpagrZ2daNE in visual studio not getting sollution
@outworkthework6 жыл бұрын
Good solid video with useful tips. So my next question is there a way to insert all of your suggestions into a script or update a ini file so we can repackage the msi with them already incorporated for less experienced developers?
@karlstenator3 жыл бұрын
Great video, thanks for sharing. I can now use Powershell via VS Code. 🏆
@baref0ot4555 жыл бұрын
Is Visual Studio Code different from Visual Studio? I use VS 2019. Thanks guys
@baref0ot4555 жыл бұрын
Trevor Sullivan Already ahead of you I downloaded and right out the box (since I already had Node JS installed) it works great. Been at for about 4 hours lol
@TH44455 жыл бұрын
Thanks for the video but... the current version of VScode editor is 1.32.3 There have been changes. Also I,m not sure about the extensions . I say this because of experience. Trevor could you please make a video on setting up VSC on windows for Html and CSS with the current version. Thanks.
@martinwhite73406 жыл бұрын
Might help others having trouble getting the integrated terminal to work in OSX: "terminal.integrated.shell.osx": "/usr/local/bin/pwsh", "terminal.integrated.shellArgs.osx": []
@olpner6 жыл бұрын
Martin white solved my problems. Cheers mate!
@jamescontreras63235 жыл бұрын
THANK you, should have read all of these comments for this :O
@dastushar85396 жыл бұрын
how to run powershelgl as an adminstrator
@snap-off53833 жыл бұрын
I don't get why powershell isn't natively supported in Visual Studio Community.
@Vern.Anderson7 жыл бұрын
Thank you! I'm glad some one finally made a tutorial for this. Any way to make VS code make good use of multiple monitors like ISE can? For example the console would take up one monitor and the editor the other.
@daviwil7 жыл бұрын
At the moment there's no way to split panes from VS Code out of the single window. In the future you may see horizontal layout of the window so that the console can be on the right side rather than the bottom, but I doubt it will ever be detachable. However, we might be able to launch an external console using the PowerShell extension.
@Vern.Anderson7 жыл бұрын
David, thank you. Yea detachable is not necessary for me personally, I just meant the capability to SPAN multiple monitors. In my case just 2 monitors. Thanks for taking time out to reply.
@wolfrackham7 жыл бұрын
Spanning monitors would be a most welcome feature. I use my monitors in portrait mode so having the terminal being able to support this would be great.
@ItzV851005 жыл бұрын
Nice, clear and well explained. very useful. thanks a lot (y) :)
@HappyYankeeFan7 жыл бұрын
Great job as always, Trevor!
@pranjalpagaria3224 жыл бұрын
can you help me with this problem kzbin.info/www/bejne/faWxnpagrZ2daNE in visual studio not getting sollution
@dsfarag7 жыл бұрын
Great video, very well laid out and explained.
@Macadoof7 жыл бұрын
Absolutely fantastic video, great presentation. Thank you. Subbed!
@will02825 жыл бұрын
Awesome vid. Keep up the good work.
@AdrianMoseley6 жыл бұрын
Very useful. Thanks for this.
@MarkFugel5 жыл бұрын
Yet another great video that is packed with some nice Visual Code goodies...especially for powershell. Quick question...i am trying to run AWS commands and so am running core...i think. My settings point to C:\\Program Files\\PowerShell\\6\\pwsh.exe but when i try to run Get-AWSPowerShellLambdaTemplate i get an error that i am running 5.1 and i need 6.0 powrshell
@bsbs18416 жыл бұрын
Awesome. Thanks for the vid!!!
@delphi887 жыл бұрын
Thx a lot. Also thx for good voice quality.
@LettersByPooja2 жыл бұрын
Thanks Travel, this was super useful to me. I have a query: the formatter did not work for me on the fly. It asked me to install the formatter and took to the extension section with search string "category:formatters powershell" and none of the results match with powershell. Any way I can bring the formatter rightly? My VS code version is 1.67.1
@akshay2012rdts4 жыл бұрын
Good Video. Thanks man
@mtbcyclist7 жыл бұрын
Great video! Thanks!
@howardwalowitz36007 жыл бұрын
very helpful! thank you!
@marcelo13025 жыл бұрын
Cool video, bro!
@AyanMullick6 жыл бұрын
Thanks for the video
@yilgullive6 жыл бұрын
Cant realy focus on the content with u swinging that claw
@diogosilva9492 Жыл бұрын
slayermusiq1? is that you?
@boolgeriyi12865 жыл бұрын
Where the FUCK is the PowerShell extension located on Windows?? If you say this is a guide for both Windows and MacOS then tell us what to do too!
@Whitecat23044 жыл бұрын
You look like David Warner
@bobkrang50072 жыл бұрын
Be careful!!! This video is 5 years old (out of date) and the presenter is using a MAC and not Windows 10!!!