正确认识 Source 参数

编程入门 行业动态 更新时间:2024-10-05 23:24:10

<a href=https://www.elefans.com/category/jswz/34/1729722.html style=正确认识 Source 参数"/>

正确认识 Source 参数

正确认识 Source 参数

Enable-WindowsOptionalFeature

Enables a feature in a Windows image.

语法

    Enable-WindowsOptionalFeature [-All] [-LimitAccess] [-LogLevel <LogLevel>] [-LogPath <String>] [-NoRestart] [-PackageName <String>] [-ScratchDirectory <String>] [-Source <String[]>] [-SystemDrive <String>] [-WindowsDirectory <String>] -FeatureName <String[]> -Online [<CommonParameters>]Enable-WindowsOptionalFeature [-All] [-LimitAccess] [-LogLevel <LogLevel>] [-LogPath <String>] [-NoRestart] [-PackageName <String>] [-ScratchDirectory <String>] [-Source <String[]>] [-SystemDrive <String>] [-WindowsDirectory <String>] -FeatureName <String[]> -Path <String> [<CommonParameters>]
…

-Source <String[]>
Specifies the location of the files that are required to restore a feature that has been removed from the image. You can specify the Windows directory of a mounted image or a running Windows installation that is shared on the network.If you specify multiple Source arguments, the files are gathered from the first location where they are found and the rest of the locations are ignored. Separate feature names with a comma.

一直错误地认为 Source 只支持一个目录,还纳闷一个目录为啥要用数组呢?
原来是支持多个目录的;
如果在多个目录下有同名的文件,只使用第一个目录中的,其余的忽略。
而不是只认第一个目录,其余的忽略。

唉!

多个目录用逗号分隔。

更多推荐

正确认识 Source 参数

本文发布于:2024-02-11 22:30:57,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1683946.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:正确认识   参数   Source

发布评论

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

>www.elefans.com

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