``` $response = "" while($response -ne "QUIT") { $response = Read-Host "Type something" } <# Type something: aa Type something: quit #> ``` 您也可以关注下方微信公众号获取更多资讯 ![](https://s1.51cto.com/images/blog/201903/24/f3b2435b69377e98eab6d23b48a01127.jpg?x-oss-process=image/watermark,size_16,text_QDUxQ1RP5Y2a5a6i,color_FFFFFF,t_100,g_se,x_10,y_10,shadow_90,type_ZmFuZ3poZW5naGVpdGk=)