Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/powershell/11.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Powershell 获取无效的Acl名称_Powershell - Fatal编程技术网

Powershell 获取无效的Acl名称

Powershell 获取无效的Acl名称,powershell,Powershell,我正在使用PowerShell 7,这样我就可以通过我们用于共享文件夹/文件的2008 R2服务器上260个字符的限制 代码 $root=目标起始目录 运行下面的代码并获取 Get-Acl: C:\scripts\script.ps1 Line | 17 | $AllAcl = Get-ACL $folder.Fullname | ~~~~~~~~~~~~~~~~~~~~~~~~ | Invalid name. (Parameter

我正在使用PowerShell 7,这样我就可以通过我们用于共享文件夹/文件的2008 R2服务器上260个字符的限制

代码

$root=目标起始目录

运行下面的代码并获取

Get-Acl: C:\scripts\script.ps1
Line |
  17 |      $AllAcl = Get-ACL $folder.Fullname
     |                ~~~~~~~~~~~~~~~~~~~~~~~~
     | Invalid name. (Parameter 'name')
你知道去哪里找吗?我能够访问该文件夹,我有权使用我正在使用的帐户访问该文件夹

用try-catch-and-Start脚本调整了代码,就是这样

$root=L:\Depts\AdminFinance\Campus Planning\PR-00无编号的小项目文件夹\已完成的小项目

给我带来问题的文件夹如下,我检查了权限和所有者。自己的是S-1-15。。。但是,问题文件夹上方的文件夹与S-1-15的所有者相同。。。我认为这不是问题所在

PS TerminatingError(Get-Acl): "Invalid name. (Parameter 'name')"

$root\Bldg 50 Fuel Cell Lab Complete\0900 - Accounting & Administration\0900.40 All Other Proposals & Invoices\0900.40.4 Fees - Advertising, Permit, Fire Marshal

$root\Bldg 50 Fuel Cell Lab Complete\1000 - Monthly Report, Lg Documents, Visuals, Etc\1050.00 Professional Services Selection Process\1050.20 Construction Mgmt Services

$root\Fine Arts Print Making Studio (PR004)\0900 - Accounting & Administration\900.40 All Other Proposals & Invoices\900.40.4 Advertising-Permits-Fire Marshal Fees

$root\TV Studio Relocation bldg 14D Complete\0200.00 - Architect, subconsultant\0200.10 Architect (Subconsult) - Contract & Insurance, Notice to Proceed\0200.10.1 Contract Changes (ASAs)

$root\TV Studio Relocation bldg 14D Complete\0900 - Accounting & Administration\0900.40 All Other Proposals & Invoices\0900.40.3 Other Communications - Voice, Data, Etc

$root\TV Studio Relocation bldg 14D Complete\0900 - Accounting & Administration\0900.40 All Other Proposals & Invoices\0900.40.4 Fees - Advertising, Permit, Fire Marshal

$root\TV Studio Relocation bldg 14D Complete\1000 - Monthly Reports, Lg Documents, Visuals, Etc\1000.40 Shop Drawings (Sample Submittals) & UNF Review Comments

我将以下信息输出到CSV文件

"Path_Length" - "271"

"Target" - "Local\Domain Admins"

"Permission Level" - "FullControl"

"Path" - "$root\Bldg 50 Fuel Cell Lab Complete\1000 - Monthly Report, Lg Documents, Visuals, Etc\1050.00 Professional Services Selection Process\1050.20 Construction Mgmt Services"

无法复制,但我认为这可能与您的长文件名有关。用于
c#
,不幸的是,它不是
powershell
,但它似乎使用了相同的基本功能,并且解决方法已确认成功。这有帮助吗?我以前很累,这是关于我遇到的260个字符的问题的原始帖子,我已经尝试了很多。我编辑了我的原始帖子,以证明输出是正确的。只是试图找出错误,以便在出现问题时修复问题。
$folder | Get Acl
有效吗?无法复制,但我认为这可能也与您的长文件名有关。用于
c#
,不幸的是,它不是
powershell
,但它似乎使用了相同的基本功能,并且解决方法已确认成功。这有帮助吗?我以前很累,这是关于我遇到的260个字符的问题的原始帖子,我已经尝试了很多。我编辑了我的原始帖子,以证明输出是正确的。只是想找出错误,以便在有问题的情况下修复问题。
$folder | Get Acl
有效吗?
"Path_Length" - "271"

"Target" - "Local\Domain Admins"

"Permission Level" - "FullControl"

"Path" - "$root\Bldg 50 Fuel Cell Lab Complete\1000 - Monthly Report, Lg Documents, Visuals, Etc\1050.00 Professional Services Selection Process\1050.20 Construction Mgmt Services"