The implementation of Read-Host differs…depending on the hosting application.…So, what you're looking at now…is what most people call the console application.…When you use Read-Host here,…prompts appear on the command line.…You type here response and hit Enter.…If we take this exact same command,…copy it to the clipboard and paste it into the…integrated scripting environment.…And right here, you can see that Read-Host is now…implemented as a pop up dialog box with a Cancel button.…
So, I can enter my response into the text box…and hit OK and then check to see that,…yep the result did go into the variable correctly.…So, the behavior of Read-Host can potentially differ…depending on exactly where you are using it.…Just be aware of that.…There is no native way in PowerShell to force…the console host to pop up a dialog box like that.…Without diving into the .Net Framework…and doing a tiny little bit of programming,…input is always collected at the command line.…
In the ISE, it's exactly the opposite.…Since there isn't really a command line per se,…
Author
Released
3/10/2012Skill Level Intermediate
Duration
Views
Related Courses
-
Learning Virtualization
with Martin Guidry2h 51m Beginner -
Windows 7: Networking and Security
with Steve Fullmer4h 44m Intermediate
-
1. Introduction to Windows PowerShell
-
Find PowerShell1m 10s
-
Customize PowerShell2m 29s
-
2. Run Commands in PowerShell
-
Run basic commands3m 32s
-
Use PSDrives4m 29s
-
3. The PowerShell Help System
-
Use the help system4m 32s
-
Find commands in help3m 28s
-
Use parameters to add values4m 17s
-
Use online help4m 9s
-
4. The PowerShell Pipeline
-
Import and export: CSV5m 10s
-
Import and export: XML4m 7s
-
Output to a file or printer6m 14s
-
Convert data to HTML3m 23s
-
5. Extend PowerShell
-
Find and add PSSnapins2m 43s
-
6. Objects: Data, by Another Name
-
Discover the object's output6m 44s
-
Sort objects2m 50s
-
7. Dig Deeper into the PowerShell Pipeline
-
Use pipeline input: ByValue5m 19s
-
8. PowerShell Formatting
-
Use the default formatting3m 50s
-
Format wide lists1m 16s
-
Format regular lists2m 13s
-
Format tables4m 11s
-
Learn to format last3m 55s
-
9. Comparisons and Filtering
-
10. PowerShell Remoting
-
Enable PowerShell remoting1m 57s
-
Use one-to-one remoting4m 11s
-
Use one-to-many remoting4m 12s
-
11. PowerShell Jobs
-
Start a job2m 28s
-
Manage job objects4m 54s
-
12. Windows Management Instrumentation
-
Explore WMI5m 2s
-
13. Work with Multiple Objects at Once
-
14. PowerShell Security
-
Understand trust2m 17s
-
15. PowerShell Variables
-
Use variables1m 46s
-
Name variables3m 44s
-
Use single and double quotes4m 37s
-
Use arrays1m 30s
-
Give variables a data type2m 48s
-
16. Input and Output
-
Prompt for user input1m 11s
-
Write output to the pipeline3m 42s
-
Write other messages1m 24s
-
17. Remoting Sessions
-
Create reusable sessions2m 38s
-
18. Turning Commands into Reusable Tools
-
Create a command4m 17s
-
Document a script3m 15s
- Mark as unwatched
- Mark all as unwatched
Are you sure you want to mark all the videos in this course as unwatched?
This will not affect your course history, your reports, or your certificates of completion for this course.
CancelTake notes with your new membership!
Type in the entry box, then click Enter to save your note.
1:30Press on any video thumbnail to jump immediately to the timecode shown.
Notes are saved with you account but can also be exported as plain text, MS Word, PDF, Google Doc, or Evernote.
Share this video
Embed this video
Video: Use Read-Host in different hosts