当今将身份验证嵌入PowerShell脚本的最佳实践. [英] Best practice today for embedding authentication into PowerShell scripts.

查看:124
本文介绍了当今将身份验证嵌入PowerShell脚本的最佳实践.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

如今,将某种身份验证嵌入到PowerShell脚本中以使您可以利用Windows Task Scheduler来调度脚本的最佳实践是什么.我知道之前和期间有很多公告 点燃一些有关凭据/密钥/证书的新服务的知识,这样您就不必将它们嵌入到代码中.我不知道这种情况是否适用于这种情况我有一些不需要的脚本 登录并设置我的订阅以在Azure存储中完成工作,但是现在我试图对存储密钥之类的内容进行更多查找,而不是用纯文本形式传递它们,现在我必须先登录才能做到这一点.指向好的文档的指针 有关如何启动脚本以进行登录或最佳实践的信息将非常有帮助,因为多年来,它已经发生了许多次更改,并且对于当今的工作方式,其中存在许多不正确的数据.


David Haver TCSC常务顾问–计算机解决方案公司,Microsoft金牌认证合作伙伴VA 23113 1525 Huguenot Road,Muglothian,办公室:(804)794-3491传真:(804)794.6194 www.tcsc.com

What is the best practice today for embedding some sort of authentication into your PowerShell scripts so that you can utilize the Windows Task Scheduler for scheduling your scripts.  I know there were a lot of announcements made just before and during Ignite and some about a new service for credentials/keys/certificates so that you don't have to embed them into your code.  I don't know if any of that applies in this case or not   I have some scripts where I have gotten away with not needing to log in and setting my subscription to get things done in Azure Storage but now I am trying to do more lookups of things like storage keys instead of passing them around in plain text and now I have to be logged in to do that.  Pointers to good documentation on how to start your script to get logged in or best practices would be very helpful since it has changed a number of times over the years and lots of incorrect data out there for todays way of doing things.


David Haver Managing Consultant TCSC – The Computer Solution Company a Microsoft Gold Certified Partner 1525 Huguenot Road, Midlothian, VA 23113 Office: (804) 794-3491 Fax: (804) 794.6194 www.tcsc.com

推荐答案

https://docs.microsoft.com/zh-CN/powershell/scripting/setup/winrmsecurity?view=powershell-5.1

https://docs.microsoft.com/en-us/powershell/scripting/setup/winrmsecurity?view=powershell-5.1

还有,请参阅" 加密 Powershell脚本中的密码 ".

And also, refer "Encrypt passwords in powershell scripts".

免责声明: 此 响应中包含对第三方万维网站点的引用. Microsoft为方便您而提供此信息. Microsoft不控制这些站点,也没有测试在这些站点上找到的任何软件或信息;因此,微软 不能对在此找到的任何软件或信息的质量,安全性或适用性做出任何陈述.使用Internet上发现的任何软件都存在固有的危险,Microsoft提醒您确保完全 在从Internet检索任何软件之前,先了解风险.

Disclaimer: This response contains a reference to a third-party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.

标记为答案";并在有帮助的帖子上"投票为有帮助的" 您,这可能会对其他社区成员有所帮助.

Do click on "Mark as Answer" and "Vote as Helpful" on the post that helps you, this can be beneficial to other community members.


这篇关于当今将身份验证嵌入PowerShell脚本的最佳实践.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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