使用电源Shell生成机器密钥

编程入门 行业动态 更新时间:2024-10-28 08:29:14
本文介绍了使用电源Shell生成机器密钥 - 无法识别的命令的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我正在尝试生成一个机器密钥放在我的网络配置中,但它说它无法识别。我已经阅读了以下问题并使用相同的命令但没有成功生成机器密钥。请检查我在做什么:

I am trying to generate a machine key to place in my web configs, but its saying it is not recognized. I have already read the following question and use the same commands without success Generate Machine Key. Please check what am i doing:

我拿了 Powershell脚本,然后执行以下命令:

I took the Powershell Script from microsoft site, then executed the commands below:

PS C:\> C:\Users\myuser\Desktop\Docs\KeyGeneration\machinekey.ps1

然后

PS C:\> Generate-MachineKey -validationAlgorithm SHA1

它说:

The term 'Generate-MachineKey' is not recognized as the name of a cmdlet, function, script file

推荐答案

尝试点源脚本的运行,在脚本之前放置一个句点然后放一个空格

Try "dot sourcing" the running of the script, by placing a period and then a space before the script

PS C:>。 C:\ Users \ myuser \Desktop \Docs \KeyGeneration\machinekey.ps1

PS C:> . C:\Users\myuser\Desktop\Docs\KeyGeneration\machinekey.ps1

更多推荐

使用电源Shell生成机器密钥

本文发布于:2023-11-09 13:45:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1572514.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:密钥   电源   机器   Shell

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!