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