Outdated Drivers Are Slowing You Down
One free scan finds every outdated or missing driver and matches the right update for your exact hardware.Free scan · exact hardware matchWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstalliTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Save a short PowerShell script, then point a Windows shortcut at PowerShell with the script’s -File option. In the script, Read-Host displays an editable console prompt, stores what the user types in a variable, and lets the next command use that value.
$text = Read-Host 'Enter your text'
# Replace this command with the task that should use $text.
Write-Output $text
A Windows PowerShell shortcut target normally looks like this:
%SystemRoot%System32WindowsPowerShellv1.0powershell.exe -NoProfile -File "C:PathToPrompt.ps1"
Replace the script path with your real file location. This creates a command-line prompt, not a separate graphical text box.
Do these 3 things before closing this tab:
1Clear out junk files and repair common Windows errors2Scan for outdated or missing drivers - takes under a minute3Repair Windows errors before they cause bigger problemsWhat you are building
The shortcut starts a PowerShell process. PowerShell runs a .ps1 file, pauses at Read-Host, and waits for a line of keyboard input. The returned string is assigned to $text; the command that follows can substitute $text wherever the entered value is needed.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application: attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
Microsoft describes the behavior precisely: “The Read-Host cmdlet reads a line of input from the console.” The prompt accepts normal keyboard editing before you press Enter. It is therefore suitable when a user needs to change a value each time a shortcut is launched, while still working in a console window.
The shortcut does not contain the prompt logic itself. It contains an executable, a few PowerShell options, and the path to the script. That separation makes the script easier to read, test, and revise without rebuilding the shortcut every time the task changes.
Before you start
- Have a plain-text editor such as Notepad.
- Choose a folder for the script and note its complete path.
- Decide whether the shortcut should use Windows PowerShell or PowerShell 7.
- Confirm that a console window is acceptable.
Read-Hostis not a graphical text-entry control.
The downstream command is task-specific, so the examples deliberately use Write-Output as a visible placeholder. Replace that statement with the command your own workflow requires; do not remove the variable reference from that command.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
Step 1: create the PowerShell script
Open a text editor
Open Notepad or another plain-text editor. Do not create a formatted Word document; PowerShell needs the file to contain text only.
Enter the prompt code
$text = Read-Host 'Enter your text'
# Replace this line with the command that should use $text.
Write-Output $text
The first line displays Enter your text and assigns the entered line to $text. The sample Write-Output $text simply writes the value back so you can see that the shortcut worked. Replace that line with the command for your own task. Keep $text in the command wherever the user’s response belongs.
Variable names are case-insensitive in PowerShell, but spelling still matters. If you assign the response to $text, use $text in the following command rather than accidentally referring to another variable. If a command needs a different representation, convert or validate the string in the script before passing it on.
Save with a .ps1 extension
- Choose File > Save As in the editor.
- Set Save as type to All files, if that option is available.
- Give the file a name such as
Prompt.ps1. - Save it in a folder whose full path you can identify, for example
C:ScriptsPrompt.ps1.
Using All files prevents the editor from silently adding .txt to the name. If the file becomes Prompt.ps1.txt, the shortcut will not be pointing to a PowerShell script. In File Explorer, turn on file-name extensions when checking the result so the final extension is visible.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Step 2: make the Windows shortcut
- Right-click an empty area of the desktop or a folder, choose New > Shortcut.
- In Type the location of the item, enter the PowerShell executable followed by
-NoProfileand-File. For Windows PowerShell, use:
%SystemRoot%System32WindowsPowerShellv1.0powershell.exe -NoProfile -File "C:ScriptsPrompt.ps1"
- Change
C:ScriptsPrompt.ps1to the actual path of your file. Keep quotation marks around a path containing spaces, such as"C:UsersAlex MorganDocumentsPrompt.ps1". - Select Next, enter a shortcut name such as Prompt input, and select Finish.
-NoProfile starts PowerShell without loading the user’s PowerShell profile, making the shortcut’s startup independent of profile customizations. -File tells PowerShell to run the script at the path that follows it. The script path should be the final PowerShell command-line parameter. Do not append unrelated options after the script path when composing this target.
Understand the target line
The target has three functional parts: the executable path, the startup option, and the script option plus path. %SystemRoot% resolves to the Windows directory, so the standard Windows PowerShell location does not depend on a particular drive letter. The path after -File must point to the actual file, not merely to its containing folder.
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
Check the shortcut properties
Right-click the new shortcut and choose Properties. The Target field should contain the executable, its options, and the quoted script path on one line. The Start in field is separate; it does not replace the script path in Target. If you later move the script, edit the target to the new location. A shortcut stores path text and does not automatically follow a moved file.
Use the prompt and edit its input
Double-click the shortcut. A console window opens and displays the prompt text. Type a value, move the cursor with the arrow keys, use Backspace or Delete to correct it, and press Enter when the line is ready. PowerShell then assigns the complete line to $text and runs the next statement.
Free tools Windows power users keep installed
One-click scans. No signup required.
Because Read-Host returns a string by default, numbers and other values arrive as text. The prompt itself does not validate content or enforce a format. If the command after the prompt requires a particular format, perform the needed conversion or validation in the script before using the variable. This also gives you a place to handle an empty response according to the needs of your task.
Test with visible output first
Leave Write-Output $text in place for the first run. It confirms that the script opened, accepted editing, and received the final line. Once that works, replace it with the real task command. If the replacement command finishes immediately, the console window may close as soon as the script ends, depending on how the shortcut was launched. During testing, temporarily retain a visible output statement or launch the script from an existing PowerShell window so errors remain readable.
Place the entered value in your command
The important pattern is assignment followed by variable use:
$text = Read-Host 'Enter your text'
# Your task-specific command goes here and refers to $text.
Write-Output $text
Do not put the prompt itself in the shortcut target. Keeping the code in a script makes quoting, editing, and later changes manageable. The shortcut only needs to locate PowerShell and the script.
If the task requires several inputs, add another Read-Host line and store its result in a different variable. For example:
$name = Read-Host 'Enter a name'
$note = Read-Host 'Enter a note'
# Replace this line with the command that uses $name and $note.
Write-Output "Name: $name"
Write-Output "Note: $note"
Give each prompt a clear label so the user knows what to enter. Every response remains console text unless your script explicitly converts or processes it. The documented limit applies to each line read by Read-Host; splitting a workflow into multiple prompts does not turn the input into a multiline editor.
Windows PowerShell and PowerShell 7
There are two commonly encountered PowerShell executables. The target shown above launches Windows PowerShell, whose executable is normally located under the Windows system directory. PowerShell 7 uses pwsh.exe instead. Do not assume that the Windows PowerShell path launches PowerShell 7.
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
| Choice | Executable in the shortcut | When it fits | Path considerations |
|---|---|---|---|
| Windows PowerShell | %SystemRoot%System32WindowsPowerShellv1.0powershell.exe |
The script is intended for the PowerShell included with Windows. | The system-directory path in the example is the standard Windows PowerShell target. |
| PowerShell 7 | pwsh.exe or the full path to the installed pwsh.exe |
You have PowerShell 7 installed and want that shell to run the script. | Use the executable path or alias available on that computer instead of assuming the Windows PowerShell location. |
The script syntax in this example is deliberately simple. If a script depends on a particular PowerShell edition, select that edition explicitly in the shortcut so the same shell is used every time. A shortcut that works on one computer may open a different edition on another if it relies on an unqualified executable name.
Quick wins for a faster PC:
Fix the driver behind crashes, sound loss and screen glitchesFind Drivers →Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Console window, PowerShell, and Windows Terminal
PowerShell is the shell that interprets the script. Windows Terminal is a host application that can host PowerShell and Command Prompt. They are different components, so the window that appears depends on the Windows version and the configured default console host.
On Windows 11 version 22H2, Microsoft changed the default host for console windows to Windows Terminal after the October 2022 update. A user can select Windows Console Host instead in Windows Settings or Windows Terminal settings. Consequently, two computers using the same shortcut can display different-looking windows while running the same PowerShell script.
For a basic prompt, launching the PowerShell executable directly is the simpler arrangement. Add a wt command only when you specifically need Windows Terminal behavior such as a selected profile, tab, or window arrangement. Windows Terminal has its own command-line interface and an execution alias that is normally available; if wt cannot be found, check the Windows Settings entry for execution aliases. Wrapping the script in wt is optional and does not change what Read-Host does: it still reads from the console supplied by the host.
Input limits and interface boundaries
Maximum line length
Microsoft’s Read-Host documentation specifies a maximum input length of 1022 characters. That limit applies to the line read by the cmdlet. If users must enter longer material, this console-prompt pattern is not suitable as-is; use a file, a different input mechanism, or a design that collects multiple lines.
Recommended Free Tools
Console prompt versus graphical dialog
Read-Host is a console input command. It does not create a standalone Windows dialog with a text box, buttons, or mouse-oriented controls. If the requirement is specifically a graphical window, choose a GUI implementation instead of treating Read-Host as one. The shortcut can still launch that alternative script, but the code and user experience are different.
This distinction also affects deployment decisions. A console prompt is lightweight and already available with the selected PowerShell shell, while a graphical design requires additional interface code. Do not choose the console method merely because the shortcut must be easy to create if users need visual controls or input longer than one line.
Troubleshoot a shortcut that does not work
The shortcut says the path cannot be found
- Open the script’s folder and confirm the exact filename, including the
.ps1extension. - Compare that full path with the value after
-Filein the shortcut’s Target field. - Put quotation marks around the entire script path when any folder or filename contains spaces.
- Verify that the executable path is spelled correctly and that the environment variable begins with
%SystemRoot%. - Check that the path after
-Fileis the final parameter and has not been truncated when pasted into the shortcut dialog.
The editor saved a text file instead of a script
In File Explorer, enable file-name extensions and inspect the name. A file ending in .ps1.txt is a text file with the wrong extension. Save it again with Save as type set to All files, or rename it so the final extension is exactly .ps1.
The prompt appears, but the value is not used
Check the line after Read-Host. The response must be assigned to a variable, and the subsequent command must refer to that same variable. In the example, the variable is $text; using a different spelling in the command will not refer to the intended value. Keep the assignment and use in the same script while testing so it is clear where the value changes.
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
The wrong PowerShell edition opens
Inspect the first part of the shortcut target. The Windows PowerShell path launches powershell.exe; PowerShell 7 requires pwsh.exe or its installed full path. Select one deliberately rather than relying on whichever executable happens to be associated with a file.
The console closes before you can read an error
Run the script from an already open PowerShell window, or temporarily keep the sample output statement after the task. This separates script errors from the normal behavior of a process that exits when its script has completed. Once the task is working, remove diagnostic output if it is no longer useful.
You expected a dialog box
That expectation conflicts with the implementation: this method reads from the console. Use a graphical input design if a window with a text field is a requirement.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Useful variations
Give the shortcut a meaningful name
The shortcut name is independent of the script filename. Name it after the task users perform, while retaining a descriptive script filename for maintenance. Renaming the shortcut does not change the command in its Target field.
Keep the script portable within a folder
If you move the script, update the shortcut’s Target path. A shortcut stores the path text; it does not automatically follow a script moved to another directory. If you copy the shortcut and script to another computer, recheck both the executable choice and the script path there.
Run without user profile customizations
Keep -NoProfile when you want predictable startup that does not load profile commands. Remove it only when the script intentionally depends on functions or settings defined in the user’s profile. Using the option consistently also makes troubleshooting easier because profile startup code is not part of the shortcut’s execution path.
Choose a host intentionally
Most users should leave the shortcut pointed directly at PowerShell and let Windows select the configured console host. If a workflow specifically needs a Windows Terminal profile or tab arrangement, investigate the wt command-line interface and verify that its execution alias is available. This is a host choice, not a replacement for choosing the PowerShell executable that runs the script.
When this method is the right choice
- Choose it when a user needs to type or revise one line each time a shortcut runs.
- Choose it when a console window is acceptable and the task can consume a string variable.
- Choose Windows PowerShell or PowerShell 7 explicitly when script compatibility depends on the shell edition.
- Choose another implementation when the input must be graphical or longer than 1022 characters.
- Use multiple clearly labeled
Read-Hostcalls when a task needs several separate short responses.
The essential workflow remains short: save a .ps1 file, assign Read-Host to a variable, use that variable in the task command, and create a shortcut whose target invokes the chosen PowerShell executable with -NoProfile -File. Test first with visible output, quote paths containing spaces, and remember that the console host’s appearance may vary even though the PowerShell script is the same.
Frequently Asked Questions
Can I make the shortcut prompt for input without opening Windows Terminal?
The shortcut can launch the PowerShell executable directly, as in the provided target. The visible host is determined by Windows and its console-host settings; PowerShell itself remains the shell running the script.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
What is the longest line that Read-Host accepts?
Microsoft documents a maximum input length of 1022 characters for Read-Host.
Does Read-Host create a graphical text box?
No. It reads an editable line from console input. A graphical dialog requires a different script and input implementation.
How do I launch PowerShell 7 instead of Windows PowerShell?
Use pwsh.exe, or the full path to the installed PowerShell 7 executable, in the shortcut target. The powershell.exe path shown in the example is for Windows PowerShell.
Why must I quote the script path?
Quote the complete path after -File whenever a folder or filename contains spaces. Without the quotes, the shortcut target can split the path into separate command-line arguments.
What does -NoProfile change?
It starts PowerShell without loading the user’s PowerShell profile. Keep it for predictable startup; remove it only when the script intentionally relies on profile-defined commands or settings.
Can I collect more than one answer?
Yes. Add additional Read-Host lines and assign each response to a separate variable, then use those variables in the task command. Each response is still console text.
Why does the window look different on two Windows computers?
PowerShell is the shell, while Windows Terminal or Windows Console Host is the host. Windows version and console-host settings determine the visible window, including the Windows 11 22H2 default-host change.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The Bottom Line
Save the prompt as a .ps1 file, assign Read-Host to a variable, and point a shortcut at the chosen PowerShell executable with -NoProfile -File. Quote paths with spaces, test with visible output, and use a different implementation when you need a graphical dialog or input longer than 1022 characters.
Quick Recap
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.

