Enable ISE Mode in VSCode
Fredrik Wall | Not Just Another PowerShell Blog
by Fredrik
3y ago
If you like the settings that you had in PowerShell ISE you can enable ISE Mode in VSCode if you have some of the latest releases of the PowerShell extension. You will get these settings automatically: “workbench.activityBar.visible”: false “debug.openDebug”: “neverOpen” “editor.tabCompletion”: “on” “powershell.integratedConsole.focusConsoleOnExecute”: false “files.defaultLanguage”: “powershell” “workbench.colorTheme”: “PowerShell ISE” Just Open up the command palette (Ctrl + Shift +P) and type Enable ISE Mode. I like some of the settings. If you don’t want to use the ISE m ..read more
Visit website
Clear-Host in VSCode
Fredrik Wall | Not Just Another PowerShell Blog
by Fredrik
3y ago
If you have been working with Visual Studio Code and the PowerShell extension for a while you probably have seen that Clear-Host only will clear the visible Terminal window. If you scroll up in the terminal window you will have all of the output left. This can be fixed by a setting. If you go to Settings and Search for “powershell force” you will get PowerShell > Integrated Console: Force Clear Scrollback Buffer. Mark that one and go back to you Clear-Host and run it again ..read more
Visit website
Get productcode from a WiX Toolset package
Fredrik Wall | Not Just Another PowerShell Blog
by Fredrik
3y ago
When doing automation we want to automate stuff and to get productcode/GUID for installation is one of the things we want when automate application installations. To get a GUID from an .msi file is not so hard. I have written a tool and functions for this. But to get a GUID for an .exe setup file is hard. Because the GUID is not there. Some setup.exe files is just a wrapper/package of some kind. And If the wrapper is made with WiX Toolset we can get the information from the BootstrapperApplicationData.xml file. We can get this file without the WiX Toolset tool. Open up the %TEMP ..read more
Visit website
How to extract a WiX Toolset package
Fredrik Wall | Not Just Another PowerShell Blog
by Fredrik
3y ago
When working with application installations you often wan’t to use .msi files instead of .exe files. Sometimes vendors make .exe packages with .msi files. Often they can be extracted with 7-Zip or they will be extracted to %temp% folder when started. But some times you will see files that are not extracted so easy. If you see something like this in the setup log file. [2FBC:4F94][2020-02-20T10:32:22]i001: Burn v3.11.1.2318, Windows v10.0 (Build 18363: Service Pack 0), path: C:\Users\FREDRI~1\AppData\Local\Temp{131D7831-33BA-4595-8E96-DD7FC2B9DC4E}.cr\PBIDesktopSetup_x64 (6).exe The ..read more
Visit website
Inventory tool part 5
Fredrik Wall | Not Just Another PowerShell Blog
by Fredrik
3y ago
In the last part in this series we did go thru all of the parts in the form. Now I will start to show you them one by one starting to build the form from the beginning. When starting a new forms project the form will look like above as default. All properties for the form will be in the Properties Panel to the right. I will cover all part of the form in the same order as shown in the picture at the top and as in the last post. 1. Form Icon First of all we start with the Icon. If you don’t have an Icon to use you can get a nice one at Icon Archive. They have over 700 000 icons ..read more
Visit website
Catalog error in MDT with ADK 1903
Fredrik Wall | Not Just Another PowerShell Blog
by Fredrik
3y ago
A little tip from me to you! If you get an Catalog error in Microsoft Deployment Toolkit when trying to Edit Unattended.xml or when you trying to Update a Deployment Share and MDT needs to create a catalog file. You probably have Windows ADK 1903 installed and you have an x64 bit Operating system running MDT. Microsoft have released a fix for this issue and It can be found at the ADK Install page. https://docs.microsoft.com/hu-hu/windows-hardware/get-started/adk-install The fix did not work for me so I tried to uninstall the ADK + PE add-on. And then installed the 1809 ADK instead. N ..read more
Visit website
Inventory tool part 4
Fredrik Wall | Not Just Another PowerShell Blog
by Fredrik
3y ago
As shown In the first post in this serie. The GUI will look like above. In this part we will start to learn more about the form. First of all we need to know all of the parts of the form that we want to use or change. Form Icon The default Icon for a Form is not that nice. But we can change It very easy. Form Text The default text for the form is “Form“. This is also very easy to change. GroupBox I like to group stuff with GroupBoxes and set a text that represent what the stuff inside is. GroupBox This GroupBox is for so we can show that the TextBox is for the Computer. We can ..read more
Visit website
PowerShell and Visual Studio Code on Linux
Fredrik Wall | Not Just Another PowerShell Blog
by Fredrik
3y ago
I have recorded a short video about setting up an dev/lab environment for PowerShell and Visual Studio Code on Linux. I’m using Hyper-V on Windows 10. It’s super easy to Install Ubuntu in Hyper-V. and then download and Install PowerShell 7.0 RC1 and Visual Studio Code. This can be done in the terminal using commands. But in this video I’m using Firefox to download and the GUI way to install the packages. The last thing I show is one of the things we need a dev/test environment in Linux for. Some stuff in PowerShell are not like in Windows. Because of how the operating systems are buil ..read more
Visit website
Invoke-WebRequest in the real world
Fredrik Wall | Not Just Another PowerShell Blog
by Fredrik
3y ago
When working with the cmdlet Invoke-WebRequest I have had some issues with the speed of downloading files. The lack of speed. I’m using It to download files in some automation scripts and they are running in the background. When downloading manually thru Chrome or Internet Explorer or Edge It was pretty okay download time. But when I used Invoke-WebRequest It took longer time. In the beginning I did not care because the automation went so much faster then doing It all manually. Later on I started to do some research. I had one result when using the PowerShell console, another usin ..read more
Visit website
Install Visual Studio Code
Fredrik Wall | Not Just Another PowerShell Blog
by Fredrik
3y ago
Uninstall Visual Studio Code silently with an function is pretty nice. Like in this post. And to install Visual Studio Code automatic is very easy to. Thanks to Microsoft. If you go to the VSCode marketplace online and to the PowerShell extension. And then scroll down to the section “Script-based Installation“. Then you can see that the script is published on PSGallery. If you “only” want to install Visual Studio Code as a default system installation you can run the code from the extension page. Install-Script Install-VSCode -Scope CurrentUser; Install-VSCode.ps1 It’s working ..read more
Visit website

Follow Fredrik Wall | Not Just Another PowerShell Blog on Feedspot

Continue with Google
OR