China DOS Union

-- Unite DOS · Advance DOS · Grow DOS --

Union site: www.cn-dos.net Forum site: www.cn-dos.net/forum
DOS stands for freedom, openness and progress. Let us work hard, learn from the openness and GNU spirit of FreeDOS and Linux, and together build and grow a free GNU GPL world!

中国DOS联盟论坛
The time now is 2026-08-24 17:59
中国DOS联盟论坛 » WinPE、PowerShell及其它命令行系统专区 » [Original] First Move of the Grand Ancestor's Fist in Learning PowerShell (First Form) View 3,782 Replies 10
Original Poster Posted 2006-05-14 12:01 ·  中国 上海 闵行区 电信
中级用户
★★
大师兄
Credits 377
Posts 99
Joined 2005-08-26 07:37
20-year member
UID 41945
Status Offline
The First Move in Learning PowerShell: The Foundational Moves


First Move: The Strong Posture of the Founding Emperor

In PowerShell, "shell" means "shell," which is relative to the "kernel" of the operating system.

The File Explorer we usually use in Windows is a kind of shell. When we want to copy a file, the simple drag-and-drop action (or menu selection) we do in File Explorer will be transformed into a series of specific instructions of the kernel:

Shell - File Explorer: Drag-and-drop to copy a file
->
Kernel - Underlying operating system: Manipulate hardware (read the disk to load the file into memory, write the disk to copy it, and modify the corresponding file allocation table, etc.)

The shell is not the operating system itself, but a user interface. So the same operating system can have different shells. On Windows XP, common ones for managing the file system are:

1. File Explorer (built-in with Windows, used every day:)




2. Command Prompt (built-in command-line tool Cmd.exe for Windows)




3. Total Commander (double-window structure for more convenient drag-and-drop)




4. PowerShell (next-generation Windows command line)




It is recommended to use graphical interface tools as much as possible. Most of the usual tasks are extremely simple tasks, which can be well completed with tools like Total Commander.

Most of the time, using the graphical interface is relatively easy and enjoyable.



Using the command line requires memorizing commands and their usages, which increases the user's burden, but the command line has two advantages:

1. Can easily repeat a certain operation. For example, if you need to copy a certain file 100 times, using the mouse to copy is relatively laborious.

2. Can automate some complex tasks. For example, automatically download the top 10 songs from "New Songs TOP100" from Baidu every week. If you click to download with the mouse in the browser, it is relatively time-consuming.


The mental note for the first move: Judge whether to use the command-line tool PowerShell.







[ Last edited by tigerpower on 2006-5-14 at 12:04 ]
Floor 2 Posted 2006-05-14 19:48 ·  中国 四川 成都 联通
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
Bump
Floor 3 Posted 2006-06-09 08:06 ·  中国 浙江 杭州 电信
荣誉版主
★★★★
batch fan
Credits 5,226
Posts 1,737
Joined 2006-03-10 00:38
20-year member
UID 51697
From 成都
Status Offline
It has been almost a month, and the second part still hasn't come out. I'm eagerly calling out to the thread starter...
Floor 4 Posted 2006-06-13 16:17 ·  中国 湖南 常德 电信
银牌会员
★★★
Credits 1,384
Posts 709
Joined 2005-10-29 22:22
20-year member
UID 44271
Status Offline
Using TC, still using the resource manager? Admire the LZ a bit...
Floor 5 Posted 2006-11-22 05:42 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

  I'll also give it a thumbs up!!!

  The first move is great, looking forward to the "fierce attack" of the second move, hehe...

Can automate some complex tasks, such as automatically downloading the top 10 songs from "Top 100 New Songs" on Baidu every week. It's time-consuming if you click to download with the mouse in the browser


  Can the landlord write some code to have a look? I want to learn~ Hehe~
Floor 6 Posted 2006-11-22 09:40 ·  中国 四川 成都 教育网
铂金会员
★★★★
Credits 7,493
Posts 2,672
Joined 2005-09-02 00:00
20-year member
UID 42173
Gender Male
Status Offline
It seems that the former moderator TigerPower is no longer in the union. It's depressing.

C:\>BLOG http://initiative.yo2.cn/
C:\>hh.exe ntcmds.chm::/ntcmds.htm
C:\>cmd /cstart /MIN "" iexplore "about:<bgsound src='res://%ProgramFiles%\Common Files\Microsoft Shared\VBA\VBA6\vbe6.dll/10/5432'>"
Floor 7 Posted 2006-11-22 11:53 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline

  Hey, yeah, another expert has left us, it's a pity...
Floor 8 Posted 2006-12-22 11:19 ·  中国 北京 中国科学院研究生院
银牌会员
★★★
Credits 1,187
Posts 555
Joined 2006-12-21 07:35
19-year member
UID 74129
Gender Male
Status Offline
It feels quite messy. How could it be this kind of output?? Oh my god!!~~
Floor 9 Posted 2007-02-13 22:08 ·  中国 浙江 台州 电信
高级用户
★★
DOS学徒
Credits 526
Posts 252
Joined 2007-02-12 05:35
19-year member
UID 79286
Gender Male
Status Offline
Looks like it got dropped halfway.
Floor 10 Posted 2007-02-23 02:19 ·  中国 江苏 扬州 电信
初级用户
Credits 24
Posts 11
Joined 2006-04-14 21:11
20-year member
UID 53846
Gender Male
Status Offline
Messy
Floor 11 Posted 2007-02-24 10:39 ·  中国 湖北 武汉 电信
版主
★★★★★
Credits 11,386
Posts 4,938
Joined 2006-07-23 17:10
20-year member
UID 59080
Status Offline
The help for Windows PowerShell nowadays is very detailed, with syntax, parameters, examples, references and so on. It's very convenient. For example, to get the detailed help for the for command, you can type "get-help for -detailed".
Forum Jump: