技术控

    今日:151| 主题:49194
收藏本版 (1)
最新软件应用技术尽在掌握

[其他] Go pro: The power user's guide to PowerShell

[复制链接]
比情兽更禽兽 发表于 2016-10-3 18:27:36
176 2

立即注册CoLaBug.com会员,免费获得投稿人的专业资料,享用更多功能,玩转个人品牌!

您需要 登录 才可以下载或查看,没有帐号?立即注册

x
If you’ve wrestled with Windows 10, you’ve undoubtedly heard of PowerShell. If you’ve tried to do something fancy with Win7/8.1 recently, PowerShell’s probably come up, too. After years of relying on the Windows command line and tossed-together batch files, it’s time to set your sights on something more powerful, more adaptive -- better.
  PowerShell is an enormous addition to the Windows toolbox, and it can provoke a bit of fear given that enormity. Is it a scripting language, a command shell, a floor wax? Do you have to link a cmdlet with an instantiated .Net class to run with providers? And why do all the support docs talk about administrators -- do I have to be a professional Windows admin to make use of it?
  Relax. PowerShell is powerful, but it needn’t be intimidating.
  The following guide is aimed at those who have run a Windows command or two or jimmied a batch file. Consider it a step-by-step transformation from PowerShell curious to PowerShell capable.
  Step 1: Crank it up

   The first thing you’ll need is PowerShell itself. If you’re using Windows 10, you already have PowerShell 5 -- the latest version -- installed. (Win10 Anniversary Update has 5.1, but you won’t know the difference with the Fall Update’s 5.0.) Windows 8 and 8.1 ship with PowerShell 4, which is good enough for getting your feet wet. Installing PowerShell on Windows 7 isn’t difficult, but it takes extra care -- and you need to install .Net Framework separately. JuanPablo Jofre details how to install WMF 5.0 (Windows Management Framework), which includes PowerShell, in addition to tools you won’t likely use when starting out, on MSDN.
  PowerShell offers two interfaces. Advanced users will go for the full-blown GUI, known as the Integrated Scripting Environment (ISE). Beginners, though, are best served by the PowerShell Console, a simple text interface reminiscent of the Windows command line, or even DOS 3.2.
     
Go pro: The power user's guide to PowerShell-1 (following,something,Windows,recently,addition)
    To start PowerShell as an Administrator from Windows 10, click Start and scroll down the list of apps to Windows PowerShell. Click on that line, right-click Windows PowerShell, and choose Run as Administrator. In Windows 8.1, look for Windows PowerShell in the Windows System folder. In Win7, it’s in the Accessories folder. You can run PowerShell as a “normal” user by following the same sequence but with a left click.
  In any version of Windows, you can use Windows search to look for PowerShell. In Windows 8.1 and Windows 10, you can put it on your Ctrl-X “Power menu” (right-click a blank spot on the taskbar and choose Properties; on the Navigation tab, check the box to Replace Command Prompt). Once you have it open, it's a good idea to pin PowerShell to your taskbar. Yes, you’re going to like it that much.
  Step 2: Type old-fashioned Windows commands

  You’d be amazed how much Windows command-line syntax works as expected in PowerShell.
   For example, cd changes directories (aka folders), and dir still lists all the files and folders included in the current folder.
   Depending on how you start the PowerShell console, you may start at c:\Windows\system32 or at c:\Users\ . In the screenshot example, I use cd .. (note the space) to move up one level at a time, then run dir to list all files and subfolders in the C:\ directory.

Go pro: The power user's guide to PowerShell-2 (following,something,Windows,recently,addition)
    Step 3: Install the help files

   Commands like cd and dir aren’t native PowerShell commands. They’re aliases -- substitutes for real PowerShell commands. Aliases can be handy for those of us with finger memory that’s hard to overcome. But they don’t even begin to touch the most important parts of PowerShell.
   To start getting a feel for PowerShell itself, type help followed by a command you know. For example, in the screenshot, I type help dir .
123下一页
友荐云推荐




上一篇:Major Rust rev overhauls error messages
下一篇:CSS Grid Layout: Going Responsive
酷辣虫提示酷辣虫禁止发表任何与中华人民共和国法律有抵触的内容!所有内容由用户发布,并不代表酷辣虫的观点,酷辣虫无法对用户发布内容真实性提供任何的保证,请自行验证并承担风险与后果。如您有版权、违规等问题,请通过"联系我们"或"违规举报"告知我们处理。

陌紫柔7 发表于 2016-10-18 07:02:42
说不好是在找骂么?
回复 支持 反对

使用道具 举报

东吴旅行社 发表于 2016-10-19 00:53:59
我说这位大哥,我又不是草船,你的贱用不着总往我这儿乱发!
回复 支持 反对

使用道具 举报

*滑动验证:
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

我要投稿

推荐阅读

扫码访问 @iTTTTT瑞翔 的微博
回页顶回复上一篇下一篇回列表手机版
手机版/CoLaBug.com ( 粤ICP备05003221号 | 文网文[2010]257号 )|网站地图 酷辣虫

© 2001-2016 Comsenz Inc. Design: Dean. DiscuzFans.

返回顶部 返回列表