Tutorials

Windows tutorials, tricks, tips, and guides.
You can use the Snipping Tool to take a snapshot to copy words or images from all or part of your PC screen. Use Snipping Tool to make changes or notes, then save, and share. Starting with Windows 10 build 21277, you can now uninstall and reinstall the Snipping Tool via the Optional Features page in Settings. This tutorial will show you how to install or uninstall the Snipping Tool for all users in Windows 10. Starting with Windows 10 build 21354, Snipping Tool is now updateable via the Microsoft Store outside major OS updates. It has been packaged together with Snip & Sketch so Microsoft can deliver updates for both at the same time. It has also been promoted out of the Windows Accessories folder to its own place in the Start menu. NOTE: Because Microsoft is combining both Snip & Sketch and Snipping Tool, Insiders who previously did not have Snip & Sketch installed will see Snipping Tool removed after updating to this build and will have to go and install Snip & Sketch from the Store to get it back. Option One: Uninstall Snipping Tool in Start menu Option Two: Install or Uninstall Snipping Tool in Optional Features Option Three: Install or Uninstall Snipping Tool in Command Prompt EXAMPLE: Snipping Tool option1Uninstall Snipping Tool in Start menu 1 Open the Start menu. 2 Click/tap on Windows Accessories in "All Apps" to expand it open. (see screenshot below) 3 Right click or press and hold on Snipping Tool under "Windows Accessories", and click/tap on Uninstall. 4 Continue at step 5 in option 2 below. option2Install or Uninstall Snipping Tool in Optional Features 1 Open Settings, and click/tap on the Apps icon. 2 Click/tap on Apps & features on the left side, and click/tap on the Optional features link on the right side. (see screenshot below) 3 Do step 4 (install) or step 5 (uninstall) below for what you would like to do. option2s44. To Install Snipping Tool This is the default setting. A) Click/tap on Add a feature. (see screenshot below) B) Scroll down, check Snipping Tool, click/tap on Install, and go to step 6 below. (see screenshot below) option2s55. To Uninstall Snipping Tool A) Scroll down, click/tap on Snipping Tool under Installed features, click/tap on the Uninstall button, and go to step 6 below. (see screenshot below) option2s66 Snipping Tool will now be installed or uninstalled. You can now close Settings if you like. (see screenshots below) option3Install or Uninstall Snipping Tool in Command Prompt You must be signed in as an administrator to do this option. 1 Open an elevated command prompt. 2 Do step 3 (install) or step 4 (uninstall) below for what you would like to do. option2s33. To Install Snipping Tool This is the default setting. A) Copy and paste the command below into the elevated command prompt, press Enter, and go to step 5 below. DISM /Online /Add-Capability /CapabilityName:Microsoft-Windows-SnippingTool~~~~0.0.1.0 option2s44. To Uninstall Snipping Tool A) Copy and paste the command below into the elevated command prompt, press Enter, and go to step 5 below. DISM /Online /Remove-Capability /CapabilityName:Microsoft-Windows-SnippingTool~~~~0.0.1.0 option2s55 You can now close the elevated command prompt if you like. That's it, Shawn Brink How to Manage Optional Features in Windows 10 How to Enable or Disable Snipping Tool in Windows How to Add Snipping Tool to Context Menu in Windows How to Take Screenshot using Snipping Tool in Windows How to Enable or Disable Prompt to Save Snips before Exiting Snipping Tool in Windows 10
IExpress is a Windows component since Windows 2000. It is used to create self-extracting packages from a set of files. That such packages can be used to install software. IExpress is available since Windows 2000 (Win2K). Using IExpress to create an EXE file from a BAT file will allow the EXE not to get false-positives by antivirus programs. This tutorial will show you how to create an Executable file from a batch file using IExpress. Readying your batch files and renaming the file extension from .bat to .cmd Not doing this will make the output executable file run COMMAND.COM instead of cmd.exe. 1 Find your batch file. 2 Rename the file extension from .bat to .cmd. 3 If you see this below, press Yes. 4 Now you have the .cmd file. Using IExpress Now that you have now the .cmd file ready from above, you can now do this. 1 Run IExpress.exe. 2 Click Next in the IExpress Wizard. 3 Select Extract file and run an installation command, and click Next. 4 Enter your Package title, and click Next. 5 Select No prompt, and click Next. 6 Select Do not display a License, and click Next. 7 Click Add, navigate to and select your .cmd file, and click Next. 8 Type your filename.cmd file in Install Program, and click Next. 9 Select Default (recommended), and click Next. If you want to hide the command window, select Hidden, and click Next. 10 Select No message, and click Next. 11 Enter the full target path and filename for your package, then select the 2 checkboxes, and click Next. 12 If you see this after checking the "Store files using Long File Name inside Package", click Yes. 13 Select No restart, and click Next. 14 If you want to save the SED file for future making, select Save Self Extraction Directive (SED) file, otherwise select Don't save, and click Next. 15 Click Next to create the package. 16 Click Finish when it is done. Conclusion: You now finished creating your EXE file from batch file. You can now test the file. If you want to change the icon of the file, you can use Resource editors like Resource Hacker and Resource Editor. If IExpress gives you error, try running IExpress as Administrator.
Sometimes you may need to know when a program or Microsoft Store app was installed. When programs or Microsoft Store apps are updated, it will change their installation date to be the same as last updated. This tutorial will show you different ways on how to find the installation date of programs and apps in Windows 10. Option One: Find App or Program Installation Date in Settings Option Two: Find App or Program Installation Date in Control Panel Option Three: Find App or Program Installation Date in Microsoft Store app Option Four: Find App or Program Installation Date in PowerShell Option Five: Find App or Program Installation Date in Command Prompt option1Find App or Program Installation Date in Settings 1 Open Settings, and click/tap on the Apps icon. 2 Under Apps & features on the right side, look at the install date shown for each listed app. (see screenshot below) option2Find App or Program Installation Date in Control Panel This option will not show Microsoft Store apps. 1 Open the Control Panel (icons view), and click/tap on the Programs and Features icon. 2 Look at the Installed On date shown for each listed app. (see screenshot below) option3Find App or Program Installation Date in Microsoft Store app This option will only show Microsoft Store apps. 1 Open the Microsoft Store app. 2 Click/tap on the See more (3 dots) button at the top right corner, and click/tap on My Library. (see screenshot below) 3 Click/tap on Installed on the left side, and look at the last Modified date shown for each listed app. (see screenshot below) option4Find App or Program Installation Date in PowerShell This option will not show Microsoft Store apps. 1 Open Windows PowerShell. 2 Copy and paste the command in the code box below into PowerShell, and press Enter. (see screenshot below) Get-ItemProperty hklm:\software\wow6432node\microsoft\windows\currentversion\uninstall\* | select-object DisplayName, InstallDate 3 You will now see the name and install date (YYYYMMDD) of your installed programs. option5Find App or Program Installation Date in Command Prompt This option will not show Microsoft Store apps. 1 Open a command prompt. 2 Copy and paste the command in the code box below into the command prompt, and press Enter. (see screenshot below) wmic product get Description,InstallDate 3 You will now see the name and install date (YYYYMMDD) of your installed programs. That's it, Shawn Brink How to Find Windows 10 Original Install Date and Time How to Uninstall Desktop Apps and Windows Apps in Windows 10 How to Reinstall and Re-register All Built-in Windows Apps in Windows 10
When making a PowerShell script to do multiple, optional tasks, it is practical to use a menu to let user to select what to do. There are several methods to create a PS menu. In this tutorial, I will show how to create a simple menu using a so called Do - While loop, which performs tasks until user selects to quit script. In this sample, I will create a menu to either export (backup), delete, start or stop (shut down) one or more virtual machines using grid view table selection (see tutorial). You can view and download the sample script on my OneDrive. Line numbers used in this tutorial refer to line numbers shown in OneDrive Preview. View and Download: SampleMenu.ps1 1. To start with, we create a menu, and store it to variable $MainMenu: $MainMenu = { Write-Host " ***************************" Write-Host " * Menu *" Write-Host " ***************************" Write-Host Write-Host " 1.) Export virtual machines" Write-Host " 2.) Delete virtual machines" Write-Host " 3.) Start virtual machines" Write-Host " 4.) Stop virtual machines" Write-Host " 5.) Quit" Write-Host Write-Host " Select an option and press Enter: " -nonewline } cls Screenshot showing how OneDrive Preview shows that part: (Click to enlarge.) How PowerShell will display it: 2. Syntax is $VariableName = {menu contents}, lines one through 13. Line 14 then clears PS window, when user has made a selection. 3. Next step is to create a Do - While loop, see lines 16 through 60 in OneDrive Preview: Do { cls Invoke-Command $MainMenu $Select = Read-Host Switch ($Select) { 1 { Commands to be run if user selects menu option 1 } 2 { Commands to be run if user selects menu option 2 } 3 { Commands to be run if user selects menu option 3 } 4 { Commands to be run if user selects menu option 4 } } } While ($Select -ne 5) See the OneDrive Preview for line numbers. Line 18 calls the menu, variable $MainMenu, and shows it. Line 19 sets menu option number user has selected to variable $Select. Line 20 swithes to selected option, executing its commands. At the end, line 60 checks if user has selected menu option 5. If not (variable $Select not equals 5), menu will be shown again. If user has selected 5, script exists. 4. For each possible menu option, we need to write cmdlets and commands to be run if that option is selected. In this sample, there are 4 options to select, fifth being to exit script. Each option starts with a number corresponding to a menu selection, followed by list of cmdlets and commands to be executed. Let's look at menu option 1 inside the Do - While loop, export virtual machines (lines 22 through 30 in OneDrive Preview). Line 25 is the most important, running a command to export selected virtual machines: 1 { Write-Host Write-Host " Select virtual machines to Export." Get-VM | Out-GridView -Title "Select virtual machines to export" -PassThru | Export-VM -Path H:\VMExport cls Write-Host Write-Host " Selected virtual machines have been exported." cls } Syntax is X {commands to be run if user selects this option}, where X is the menu option number. At the end of command in line 25, -Path H:\VMExport refers to an existing folder in which virtual machines will be exported. In this sample, options 2, 3 and 4 do not require a path. 5. We repeat step 4 to create commands for other menu options, in this sample options 2, 3 and 4. That's it. Kari
Out-Gridview is in my opinion one of the most practical PowerShell cmdlets. As all PS cmdlets, it has the same verb-noun syntax: do this (verb) with that (noun). Out-GridView simply tells PS to send command output to a grid view table. The power of Out-GridView cmdlet comes from its optional -PassThru switch, which lets user to select items from table, then passing them as parameters to another cmdlet. Out-GridView without -PassThru only lists command output in a table. The syntax with -PassThru switch is as follows: first cmdlet | Out-GridView -PassThru | another cmdlet In this tutorial, I will show just a few practical examples about using Out-GridView with -PassThru, to let you see and understand how it works. See official Out-GridView documentation on Microsoft Docs for more information. Some practical examples 1. Hyper-V: Start and stop VMs using Out-GridView 2. Files: Copy, move & delete files using Out-GridView 3. Windows Features: Add or remove optional features using Out-GridView Part1Start and stop VMs using Out-GridView 1.1 Cmdlets used in following examples: Get-VM ➡️ Lists all Hyper-V virtual machines Start-VM ➡️ Starts selected VM Stop-VM ➡️ Stops selected VM 1.2 To start one or more virtual machines using Out-Gridview, we start with cmdlet Get-VM to list all available VMs, then show the list in grid view table, select VMs we want to start, and pass that selection to cmdlet Start-VM: Get-VM | Out-GridView -PassThru | Start-VM When command is executed (#1 in screenshot), grid view table shows all virtual machines. To select VMs I want to start, I hold down CTRL key and select them from the list (#2), then click OK to start selected VMs (#3): (Click to enlarge.) Hyper-V Manager will now show that both selected are running. You can also see the status with Out-GridView with this simple command: Get-VM | Out-GridView (Click to enlarge.) 1.3 OK, now I want to stop one or more running virtual machines. The procedure is exactly the same than when starting them, I just need to change the last cmdlet from Start-VM to Stop-VM Get-VM | Out-GridView -PassThru | Stop-VM Part2Copy, move & delete files using Out-GridView 2.1 Cmdlets used in following examples: Get-ChildItem ➡️ Lists all files and subfolders in selected folder Copy-Item ➡️ Copies selected items to new location Move-Item ➡️ Moves selected items to new location Remove-Item ➡️Delete a file or a folder 2.1 Copying files using Out-GridView is simple. List files with Get-ChildItem cmdlet, select which files to copy, pass the selection to Copy-Item cmdlet. Following command will list all files and folders in Documets folder of your OneDrive, and copies selected items to folder F:\OneDriveDocs: Get-ChildItem C:\Users\YourUsername\OneDrive\Documents | Out-GridView -PassThru | Copy-Item -Destination F:\OneDriveDocs See step 1.2 for how to select items. 2.2 To move files, change the last cmdlet to Move-Item. Following command would move selected items in your OneDrive\Documents folder to folder F:\OneDriveDocs: Get-ChildItem C:\Users\YourUsername\OneDrive\Documents | Out-GridView -PassThru | Move-Item -Destination F:\OneDriveDocs 2.3 To delete files, change the last cmdlet to Remove-Item. Following command would delete selected items from your OneDrive\Documents folder: Get-ChildItem C:\Users\YourUsername\OneDrive\Documents | Out-GridView -PassThru | Remove-Item 2.3 Using -Recurse switch with Get-ChildItem lists all chosen items in given folder and all its subfoders. Following command would list all files not only in OneDrive\Documents folder, but also all files in any existing subfolder of Documents, let you select the files to be deleted, and then delete them: Get-ChildItem C:\Users\YourUsername\OneDrive\Documents -Recurse | Out-GridView -PassThru | Remove-Item 2.4 With -Recurse switch, we can also use -Include switch to narrow down the list with wildcards. Following command would list all ISO images (extension .iso) on drive G: and all its subfolders, show them in table, let user to select ISO images to be deleted, then delete them: Get-ChildItem G:\ -Recurse -Include *.iso | Out-GridView -PassThru | Remove-Item 2.5 To list all JPG and PNG images on folder D:\HolidayPics and all its subfolders, and copy selected items to folder X:\Backup\HolidayPics: Get-ChildItem D:\HolidayPics -Recurse -Include *.jpg, *.png | Out-GridView -PassThru | Copy-Item -Destination X:\Backup\HolidayPics Notice that as I wanted to list multiple file types, I separated them with a comma (-Include *.jpg, *.png). Part3Add or remove optional features using Out-GridView 3.1 Cmdlets used in following examples: Get-WindowsOptionalFeature ➡️ Lists all available optional features Enable-WindowsOptionalFeature ➡️ Enables selected optional features Disable-WindowsOptionalFeature ➡️ Disables selected optional features 3.2 To list currently disabled Windows optional features, and select features to be enabled: Get-WindowsOptionalFeature -OnLine | Where-Object {$_.State -eq "Disabled"} | Out-GridView -PassThru | Enable-WindowsOptionalFeature 3.3 To list currently enabled Windows optional features, and select features to be disabled: Get-WindowsOptionalFeature -OnLine | Where-Object {$_.State -eq "Enabled"} | Out-GridView -PassThru | Disable-WindowsOptionalFeature The few examples shown in this tutorial show you how to use Out-GridView. When used without switches, it lists selected command's output for viewing. When used with -PassThru switch, it passes selected output from first cmdlet as parameters to second cmdlet. Easy, and practical! Kari
Top