有谁知道在哪里下载Powershell的示例代码? [英] Does anyone know where to download sample code for Powershell?

查看:96
本文介绍了有谁知道在哪里下载Powershell的示例代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好,晚安。



首先,我不太确定这篇文章属于这个论坛,但据我所知,PowerShell属于到"脚本"类别,我抓住机会。



最近(我的意思是,今天)我在博客和StackOverflow上找到了一个名为"PSSpotify"的PowerShell模块的引用。其中的作者引用了以下位置:http://archive.msdn.microsoft.com/PSSpotify。但是,当我转到该页面
时,我收到以下消息:



" 档案库已经退役。



提示



如果您输入了网址,请检查它是否包含拼写错误如果您正在寻找MSDN代码示例,请访问http://code.msdn.microsoft.com/请参阅下面的项目映射列表。" b
b $ b b b因此,考虑到我提到的出版物的相对年龄(+3岁),我很清楚这个特定的资源是最坏的情况,输了。所以,任何人都知道,我不知道,像存档这样的东西,我可以找到这么久的
存档库的资源?



谢谢提前。

Hi everyone, good night.

First of all, I'm not quite sure that this post belongs to this forum, but as I understand that PowerShell belongs to the "scripting" category, I take the chance.

Recently (I mean, today) I found on a blog and on StackOverflowthe reference to a PowerShell module called "PSSpotify" which theauthors referenced to the following location: http://archive.msdn.microsoft.com/PSSpotify . But, when I go to that page I get the following message:

"The Archive Gallery has been retired.

TIPS

If you entered the web address, check that it does not contain a typo If you are looking for MSDN Code Samples please go to http://code.msdn.microsoft.com/ Refer to the list of project mappings below."

So, considering the relative age of the publications that I mentioned (+3 years old), it's clear to me that this particular resource is, in the worst scenario, lost. So, anyone know, I don't know, something like a archive where I can find resources of the Archive Gallery that are so old?

Thanks in advance.

推荐答案

嗨安东,

存档文件确实已被删除,:(。  ;没有档案档案。

The archive files have indeed been taken down, :( .  There is no Archive of archives.

所以这就是我用powershell攻击问题的方法。

So here is the way I would attack the problem with powershell.


  • 获取 - < span style ="color:#000000"> Process
    - 名称
    * Spotify *
  • 如果 获取 - 流程
    - 名称 spotify
    { #Code表示您需要做什么,例如播放或暂停  spotify }
  • 获取 - SpotifyStatus

  • Get-Process -Name *Spotify*
  • if (Get-Process -Name spotify) { #Code for what you need to do, for instance play or pause spotify }
  • Get-SpotifyStatus

这里的Powershell似乎已分解为几个部分,例如Powershell的Azure组件,而不是Powershell。与Azure没有任何关系。

Here Powershell seems to have been broken down into a few sections, for instance the Azure component of Powershell, versus Powershell that doesn't have anything to do with Azure.

对于非Azure类型的Powershell,您可能需要查看:

For non-Azure type of Powershell, you might want to take a look at:


这篇关于有谁知道在哪里下载Powershell的示例代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆