Copy-ItemProperty 帮助信息

电脑坏掉了...终于修好了....
如下说明是翻译: help Copy-ItemProperty 产生的帮助信息.
译者: Edengundam(马涛)
 
Copy-ItemProperty
 
摘要
从指定位置拷贝属性和值到另一个位置.
 
语法
Copy-ItemProperty [-path] <string[]> [-destination] <string> [-name] <string> [-force] [-include <string[]>] [-exclude <string[]>] [-filter <string>] [-passThru] [-credential <PSCredential>] [-whatIf] [-confirm] [<CommonParameters>]
 
Copy-ItemProperty [-literalPath] <string[]> [-destination] <string> [-name] <string> [-force] [-include <string[]>] [-exclude <string[]>] [-filter <string>] [-passThru] [-credential <PSCredential>] [-whatIf] [-confirm] [<CommonParameters>]
 
详细描述
从指定位置拷贝属性和值到另一个位置.
 
参数
 
-path <string[]>
指定需要拷贝的属性路径.
 
强制参数?
true
参数位置?
1
默认值
N/A – 必须指定路径
允许从管道绑定输入?
true (根据值, 根据属性名)
允许通配符扩展?
true
 
-destination <string>
指定拷贝属性的目的路径.
 
强制参数?
true
参数位置?
2
默认值
N/A – 必须指定目的路径
允许从管道绑定输入?
true (根据属性名)
允许通配符扩展?
true
 
-name <string>
指定拷贝属性的名称.
 
强制参数?
true
参数位置?
3
默认值
String.empty
允许从管道绑定输入?
true (根据属性名)
允许通配符扩展?
false
 
-force <SwitchParameter>
在不破坏安全性的前提下, 能够避免影响命令成功执行的限制条件, 例如: 覆盖已经存在的文件.
 
强制参数?
false
参数位置?
named
默认值
False
允许从管道绑定输入?
false
允许通配符扩展?
false
 
-include <string[]>
指定只由此cmdlet操作的对象, 排除所有其它对象.
 
强制参数?
false
参数位置?
named
默认值
 
允许从管道绑定输入?
false
允许通配符扩展?
true
 
-exclude <string[]>
忽略指定的项. 允许使用通配符.
 
强制参数?
false
参数位置?
named
默认值
 
允许从管道绑定输入?
false
允许通配符扩展?
true
 
-filter <string>
指定提供程序要求的和支持的过滤元素.
 
强制参数?
alse
参数位置?
named
默认值
 
允许从管道绑定输入?
false
允许通配符扩展?
false
 
-passThru <SwitchParameter>
输出此命令创建的对象到管道中. 默认情况下, 此命令不会将对象输出到管道.
 
强制参数?
false
参数位置?
named
默认值
False
允许从管道绑定输入?
false
允许通配符扩展?
false
 
-credential <PSCredential>
使用其他凭证进行资源访问认证. 如果指定了一个之前使用Get-Credential获得的PSCredential对象, 将会直接使用该对象. 如果此处使用用户名, 命令执行时会提示输入该用户密码.
 
强制参数?
false
参数位置?
named
默认值
 
允许从管道绑定输入?
true (根据属性名)
允许通配符扩展?
false
 
-literalPath <string[]>
指定属性的路径. LiteralPath的值按照输入格式被直接使用, 不会对任何通配符进行解释. 如果路径中包含了转义字符, 需要将路径用单引号保护. 单引号指示Windows PowerShell不对字符串中的转义字符进行处理.
 
强制参数?
true
参数位置?
1
默认值
 
允许从管道绑定输入?
true (根据属性名)
允许通配符扩展?
false
 
-whatIf
描述执行此命令将会发生的现象, 不会真正执行此命令.
 
强制参数?
false
参数位置?
named
默认值
 
允许从管道绑定输入?
false
允许通配符扩展?
false
 
-confirm
执行命令前提示你进行确认.
 
强制参数?
false
参数位置?
named
默认值
 
允许从管道绑定输入?
false
允许通配符扩展?
false
 
<公共参数>
此命令支持公共参数: -Verbose, -Debug, -ErrorAction, -ErrorVariable, and -OutVariable. 更多信息, 输入, "get-help about_commonparameters".
 
注意
 
更多信息, 输入"Get-Help Copy-ItemProperty -detailed". 需要技术信息, 输入"Get-Help Copy-ItemProperty -full".
 
如果需要为该命令提供多个参数, 请使用逗号进行分隔. 例如, "<parameter-name> <value1>, <value2>".
 
1
 
C:/PS>copy-itemproperty -path MyApplication -destination HKLM:/Software/MyApplicationRev2 -name MyProperty
 
此命令从MyApplication注册表项上拷贝名为MyProperty的属性到MyApplicationRev2注册表项.
 
相关链接
Clear-ItemProperty
New-ItemProperty
Move-ItemProperty
Rename-ItemProperty
Get-ItemProperty
Set-ItemProperty
about_namespace
 
CommandType Name Version Source ----------- ---- ------- ------ Alias Get-PSResource 1.1.1 Microsoft.PowerShell.PSResourceGet Function Compress-Archive 1.2.5 Microsoft.PowerShell.Archive Function Compress-Archive 1.0.1.0 Microsoft.PowerShell.Archive Function ConvertFrom-SddlString 3.1.0.0 Microsoft.PowerShell.Utility Function Expand-Archive 1.2.5 Microsoft.PowerShell.Archive Function Expand-Archive 1.0.1.0 Microsoft.PowerShell.Archive Function Export-ODataEndpointProxy 1.0 Microsoft.PowerShell.ODataUtils Function Format-Hex 3.1.0.0 Microsoft.PowerShell.Utility Function Get-FileHash 3.1.0.0 Microsoft.PowerShell.Utility Function Get-OperationValidation 1.0.1 Microsoft.PowerShell.Operation.Validation Function Import-PowerShellDataFile 3.1.0.0 Microsoft.PowerShell.Utility Function Import-PSGetRepository 1.1.1 Microsoft.PowerShell.PSResourceGet Function Invoke-OperationValidation 1.0.1 Microsoft.PowerShell.Operation.Validation Function New-Guid 3.1.0.0 Microsoft.PowerShell.Utility Function New-TemporaryFile 3.1.0.0 Microsoft.PowerShell.Utility Cmdlet Add-Computer 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Add-Content 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Add-History 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Add-LocalGroupMember 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet Add-Member 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Add-Type 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Checkpoint-Computer 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Clear-Content 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Clear-EventLog 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Clear-History 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Clear-Item 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Clear-ItemProperty 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Clear-RecycleBin 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Clear-Variable 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Compare-Object 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Complete-Transaction 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Compress-PSResource 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Connect-PSSession 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Convert-Path 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Convert-String 3.1.0.0 Microsoft.PowerShell.Utility Cmdlet ConvertFrom-CliXml 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet ConvertFrom-Csv 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet ConvertFrom-Json 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet ConvertFrom-Markdown 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet ConvertFrom-SddlString 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet ConvertFrom-SecureString 7.0.0.0 Microsoft.PowerShell.Security Cmdlet ConvertFrom-String 3.1.0.0 Microsoft.PowerShell.Utility Cmdlet ConvertFrom-StringData 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet ConvertTo-CliXml 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet ConvertTo-Csv 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet ConvertTo-Html 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet ConvertTo-Json 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet ConvertTo-SecureString 7.0.0.0 Microsoft.PowerShell.Security Cmdlet ConvertTo-Xml 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Copy-Item 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Copy-ItemProperty 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Debug-Job 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Debug-Process 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Debug-Runspace 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Disable-ComputerRestore 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Disable-ExperimentalFeature 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Disable-LocalUser 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet Disable-PSBreakpoint 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Disable-PSRemoting 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Disable-PSSessionConfiguration 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Disable-RunspaceDebug 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Disconnect-PSSession 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Enable-ComputerRestore 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Enable-ExperimentalFeature 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Enable-LocalUser 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet Enable-PSBreakpoint 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Enable-PSRemoting 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Enable-PSSessionConfiguration 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Enable-RunspaceDebug 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Enter-PSHostProcess 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Enter-PSSession 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Exit-PSHostProcess 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Exit-PSSession 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Export-Alias 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Export-Clixml 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Export-Counter 3.0.0.0 Microsoft.PowerShell.Diagnostics Cmdlet Export-Csv 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Export-FormatData 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Export-ModuleMember 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Export-PSSession 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Find-PSResource 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet ForEach-Object 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Format-Custom 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Format-Hex 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Format-List 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Format-Table 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Format-Wide 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Acl 7.0.0.0 Microsoft.PowerShell.Security Cmdlet Get-Alias 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-AuthenticodeSignature 7.0.0.0 Microsoft.PowerShell.Security Cmdlet Get-ChildItem 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-Clipboard 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-CmsMessage 7.0.0.0 Microsoft.PowerShell.Security Cmdlet Get-Command 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Get-ComputerInfo 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-ComputerRestorePoint 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Get-Content 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-ControlPanelItem 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Get-Counter 7.0.0.0 Microsoft.PowerShell.Diagnostics Cmdlet Get-Credential 7.0.0.0 Microsoft.PowerShell.Security Cmdlet Get-Culture 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Date 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Error 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Event 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-EventLog 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Get-EventSubscriber 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-ExecutionPolicy 7.0.0.0 Microsoft.PowerShell.Security Cmdlet Get-ExperimentalFeature 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Get-FileHash 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-FormatData 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Help 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Get-History 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Get-Host 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-HotFix 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-InstalledPSResource 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Get-Item 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-ItemProperty 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-ItemPropertyValue 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-Job 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Get-LocalGroup 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet Get-LocalGroupMember 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet Get-LocalUser 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet Get-Location 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-MarkdownOption 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Member 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Module 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Get-PfxCertificate 7.0.0.0 Microsoft.PowerShell.Security Cmdlet Get-Process 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-PSBreakpoint 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-PSCallStack 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-PSDrive 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-PSHostProcessInfo 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Get-PSProvider 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-PSResourceRepository 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Get-PSScriptFileInfo 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Get-PSSession 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Get-PSSessionCapability 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Get-PSSessionConfiguration 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Get-PSSubsystem 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Get-Random 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Runspace 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-RunspaceDebug 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-SecureRandom 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Service 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-TimeZone 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Get-TraceSource 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Transaction 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Get-TypeData 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-UICulture 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Unique 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Uptime 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Variable 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-Verb 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Get-WinEvent 7.0.0.0 Microsoft.PowerShell.Diagnostics Cmdlet Get-WmiObject 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Group-Object 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Import-Alias 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Import-Clixml 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Import-Counter 3.0.0.0 Microsoft.PowerShell.Diagnostics Cmdlet Import-Csv 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Import-LocalizedData 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Import-Module 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Import-PowerShellDataFile 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Import-PSSession 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Install-PSResource 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Invoke-Command 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Invoke-Expression 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Invoke-History 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Invoke-Item 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Invoke-RestMethod 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Invoke-WebRequest 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Invoke-WmiMethod 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Join-Path 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Join-String 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Limit-EventLog 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Measure-Command 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Measure-Object 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Move-Item 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Move-ItemProperty 7.0.0.0 Microsoft.PowerShell.Management Cmdlet New-Alias 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet New-Event 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet New-EventLog 3.1.0.0 Microsoft.PowerShell.Management Cmdlet New-FileCatalog 7.0.0.0 Microsoft.PowerShell.Security Cmdlet New-Guid 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet New-Item 7.0.0.0 Microsoft.PowerShell.Management Cmdlet New-ItemProperty 7.0.0.0 Microsoft.PowerShell.Management Cmdlet New-LocalGroup 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet New-LocalUser 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet New-Module 7.6.0.4 Microsoft.PowerShell.Core Cmdlet New-ModuleManifest 7.6.0.4 Microsoft.PowerShell.Core Cmdlet New-Object 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet New-PSDrive 7.0.0.0 Microsoft.PowerShell.Management Cmdlet New-PSRoleCapabilityFile 7.6.0.4 Microsoft.PowerShell.Core Cmdlet New-PSScriptFileInfo 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet New-PSSession 7.6.0.4 Microsoft.PowerShell.Core Cmdlet New-PSSessionConfigurationFile 7.6.0.4 Microsoft.PowerShell.Core Cmdlet New-PSSessionOption 7.6.0.4 Microsoft.PowerShell.Core Cmdlet New-PSTransportOption 7.6.0.4 Microsoft.PowerShell.Core Cmdlet New-Service 7.0.0.0 Microsoft.PowerShell.Management Cmdlet New-TemporaryFile 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet New-TimeSpan 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet New-Variable 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet New-WebServiceProxy 3.1.0.0 Microsoft.PowerShell.Management Cmdlet New-WinEvent 7.0.0.0 Microsoft.PowerShell.Diagnostics Cmdlet Out-Default 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Out-File 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Out-GridView 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Out-Host 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Out-Null 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Out-Printer 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Out-String 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Pop-Location 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Protect-CmsMessage 7.0.0.0 Microsoft.PowerShell.Security Cmdlet Publish-PSResource 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Push-Location 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Read-Host 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Receive-Job 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Receive-PSSession 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Register-ArgumentCompleter 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Register-EngineEvent 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Register-ObjectEvent 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Register-PSResourceRepository 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Register-PSSessionConfiguration 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Register-WmiEvent 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Remove-Alias 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Remove-Computer 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Remove-Event 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Remove-EventLog 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Remove-Item 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Remove-ItemProperty 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Remove-Job 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Remove-LocalGroup 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet Remove-LocalGroupMember 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet Remove-LocalUser 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet Remove-Module 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Remove-PSBreakpoint 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Remove-PSDrive 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Remove-PSSession 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Remove-Service 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Remove-TypeData 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Remove-Variable 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Remove-WmiObject 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Rename-Computer 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Rename-Item 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Rename-ItemProperty 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Rename-LocalGroup 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet Rename-LocalUser 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet Reset-ComputerMachinePassword 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Resolve-Path 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Restart-Computer 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Restart-Service 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Restore-Computer 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Resume-Service 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Save-Help 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Save-PSResource 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Select-Object 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Select-String 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Select-Xml 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Send-MailMessage 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Set-Acl 7.0.0.0 Microsoft.PowerShell.Security Cmdlet Set-Alias 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Set-AuthenticodeSignature 7.0.0.0 Microsoft.PowerShell.Security Cmdlet Set-Clipboard 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Set-Content 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Set-Date 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Set-ExecutionPolicy 7.0.0.0 Microsoft.PowerShell.Security Cmdlet Set-Item 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Set-ItemProperty 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Set-LocalGroup 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet Set-LocalUser 1.0.0.0 Microsoft.PowerShell.LocalAccounts Cmdlet Set-Location 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Set-MarkdownOption 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Set-PSBreakpoint 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Set-PSDebug 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Set-PSResourceRepository 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Set-PSSessionConfiguration 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Set-Service 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Set-StrictMode 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Set-TimeZone 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Set-TraceSource 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Set-Variable 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Set-WmiInstance 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Show-Command 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Show-ControlPanelItem 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Show-EventLog 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Show-Markdown 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Sort-Object 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Split-Path 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Start-Job 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Start-Process 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Start-Service 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Start-Sleep 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Start-ThreadJob 2.2.0 Microsoft.PowerShell.ThreadJob Cmdlet Start-Transaction 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Start-Transcript 7.0.0.0 Microsoft.PowerShell.Host Cmdlet Stop-Computer 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Stop-Job 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Stop-Process 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Stop-Service 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Stop-Transcript 7.0.0.0 Microsoft.PowerShell.Host Cmdlet Suspend-Service 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Tee-Object 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Test-ComputerSecureChannel 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Test-Connection 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Test-FileCatalog 7.0.0.0 Microsoft.PowerShell.Security Cmdlet Test-Json 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Test-ModuleManifest 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Test-Path 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Test-PSScriptFileInfo 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Test-PSSessionConfigurationFile 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Trace-Command 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Unblock-File 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Undo-Transaction 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Uninstall-PSResource 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Unprotect-CmsMessage 7.0.0.0 Microsoft.PowerShell.Security Cmdlet Unregister-Event 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Unregister-PSResourceRepository 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Unregister-PSSessionConfiguration 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Update-FormatData 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Update-Help 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Update-List 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Update-PSModuleManifest 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Update-PSResource 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Update-PSScriptFileInfo 1.1.1 Microsoft.PowerShell.PSResourceGet Cmdlet Update-TypeData 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Use-Transaction 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Wait-Debugger 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Wait-Event 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Wait-Job 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Wait-Process 7.0.0.0 Microsoft.PowerShell.Management Cmdlet Where-Object 7.6.0.4 Microsoft.PowerShell.Core Cmdlet Write-Debug 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Write-Error 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Write-EventLog 3.1.0.0 Microsoft.PowerShell.Management Cmdlet Write-Host 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Write-Information 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Write-Output 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Write-Progress 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Write-Verbose 7.0.0.0 Microsoft.PowerShell.Utility Cmdlet Write-Warning 7.0.0.0 Microsoft.PowerShell.Utility这些命令分别是什么意思
06-22
那你有没有把C盘的缓存包 都搬到E盘啊?“PS C:\Users\Administrator\Desktop> # 确保缓存目录存在(不删除任何已有内容) PS C:\Users\Administrator\Desktop> if (-not (Test-Path "E:\ai_temp")) { >> New-Item -ItemType Directory -Path "E:\ai_temp" -Force >> } PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # 修复后的安装函数 PS C:\Users\Administrator\Desktop> function Install-WithCache { >> param( >> [Parameter(Mandatory=$true)] >> [string]$PackageName >> ) >> >> # 检查本地缓存(支持 .whl 和 .tar.gz 格式) >> $cachedPackage = Get-ChildItem "E:\ai_temp" -Filter "$PackageName*" | >> Where-Object { $_.Extension -in @('.whl', '.gz') } | >> Sort-Object LastWriteTime -Descending | >> Select-Object -First 1 >> >> if ($cachedPackage) { >> Write-Host "✅ 从本地缓存安装: $($cachedPackage.Name)" -ForegroundColor Green >> python -m pip install $cachedPackage.FullName >> return >> } >> >> # 尝试使用国内镜像 >> try { >> Write-Host "🌐 尝试从清华镜像安装: $PackageName" -ForegroundColor Yellow >> >> # 创建临时目录(兼容旧版PowerShell) >> $tempDir = Join-Path $env:TEMP ([System.Guid]::NewGuid().ToString()) >> New-Item -ItemType Directory -Path $tempDir -Force | Out-Null >> >> # 下载并安装 >> python -m pip download $PackageName -d $tempDir -i https://pypi.tuna.tsinghua.edu.cn/simple >> $downloadedPackage = Get-ChildItem $tempDir | Where-Object { $_.Extension -in @('.whl', '.gz') } | Select-Object -First 1 >> >> if ($downloadedPackage) { >> python -m pip install $downloadedPackage.FullName >> Write-Host "✅ 安装成功" -ForegroundColor Green >> >> # 将包保存到缓存 >> Copy-Item $downloadedPackage.FullName -Destination "E:\ai_temp" >> } else { >> Write-Host "⚠️ 未找到合适的包文件" -ForegroundColor Red >> } >> >> Remove-Item $tempDir -Recurse -Force -ErrorAction SilentlyContinue >> return >> } >> catch { >> Write-Host "⚠️ 镜像安装失败: $($_.Exception.Message)" -ForegroundColor Red >> } >> >> # 最后尝试官方源 >> try { >> Write-Host "🌍 尝试从官方源安装: $PackageName" -ForegroundColor Magenta >> >> # 创建临时目录 >> $tempDir = Join-Path $env:TEMP ([System.Guid]::NewGuid().ToString()) >> New-Item -ItemType Directory -Path $tempDir -Force | Out-Null >> >> # 下载并安装 >> python -m pip download $PackageName -d $tempDir >> $downloadedPackage = Get-ChildItem $tempDir | Where-Object { $_.Extension -in @('.whl', '.gz') } | Select-Object -First 1 >> >> if ($downloadedPackage) { >> python -m pip install $downloadedPackage.FullName >> Write-Host "✅ 安装成功" -ForegroundColor Green >> >> # 将包保存到缓存 >> Copy-Item $downloadedPackage.FullName -Destination "E:\ai_temp" >> } else { >> Write-Host "⚠️ 未找到合适的包文件" -ForegroundColor Red >> } >> >> Remove-Item $tempDir -Recurse -Force -ErrorAction SilentlyContinue >> } >> catch { >> Write-Host "❌ 安装失败: $($_.Exception.Message)" -ForegroundColor Red >> } >> } PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # 修复pip配置文件 PS C:\Users\Administrator\Desktop> function Set-PipConfig { >> # 确保配置目录存在 >> $configDir = "C:\ProgramData\pip" >> if (-not (Test-Path $configDir)) { >> New-Item -ItemType Directory -Path $configDir -Force | Out-Null >> } >> >> # 创建正确的配置文件(无BOM) >> $pipConfig = @" >> [global] >> cache-dir = E:\ai_temp >> index-url = https://pypi.tuna.tsinghua.edu.cn/simple >> trusted-host = pypi.tuna.tsinghua.edu.cn >> "@ >> >> # 使用ASCII编码避免BOM问题 >> $pipConfig | Out-File "$configDir\pip.ini" -Encoding ASCII >> } PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # 缓存管理工具(不自动清理) PS C:\Users\Administrator\Desktop> function Find-Package { >> param( >> [Parameter(Mandatory=$true)] >> [string]$PackageName >> ) >> >> Get-ChildItem "E:\ai_temp" -Filter "*$PackageName*" | >> Where-Object { $_.Extension -in @('.whl', '.gz') } | >> Select-Object Name, @{Name="SizeMB"; Expression={[math]::Round($_.Length/1MB, 2)}}, LastWriteTime | >> Format-Table -AutoSize >> } PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> function Get-CacheStatus { >> $cacheItems = Get-ChildItem "E:\ai_temp" | >> Where-Object { $_.Extension -in @('.whl', '.gz') } >> >> $totalSize = ($cacheItems | Measure-Object -Property Length -Sum).Sum / 1GB >> >> Write-Host "📦 缓存状态报告" -ForegroundColor Cyan >> Write-Host "--------------------------------------" >> Write-Host "缓存目录: E:\ai_temp" >> Write-Host "包数量: $($cacheItems.Count)" >> Write-Host "总大小: {0:N2} GB" -f $totalSize >> >> if ($cacheItems.Count -gt 0) { >> Write-Host "最旧包: $(($cacheItems | Sort-Object LastWriteTime | Select-Object -First 1).LastWriteTime)" >> Write-Host "最新包: $(($cacheItems | Sort-Object LastWriteTime -Descending | Select-Object -First 1).LastWriteTime)" >> } >> >> Write-Host "--------------------------------------" >> } PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # 设置pip配置文件(修复BOM问题) PS C:\Users\Administrator\Desktop> Set-PipConfig PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # 设置环境变量 PS C:\Users\Administrator\Desktop> [Environment]::SetEnvironmentVariable("PIP_CACHE_DIR", "E:\ai_temp", "Machine") PS C:\Users\Administrator\Desktop> [Environment]::SetEnvironmentVariable("PIP_INDEX_URL", "https://pypi.tuna.tsinghua.edu.cn/simple", "Machine") PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # 搜索缓存中的包 PS C:\Users\Administrator\Desktop> Find-Package "torch" PS C:\Users\Administrator\Desktop> PS C:\Users\Administrator\Desktop> # 查看缓存状态 PS C:\Users\Administrator\Desktop> Get-CacheStatus 📦 缓存状态报告 -------------------------------------- 缓存目录: E:\ai_temp 包数量: 0 总大小: {0:N2} GB -------------------------------------- PS C:\Users\Administrator\Desktop>”
最新发布
08-23
DATA: lv_sheet_name TYPE char20. * 1. 获取第一个工作表 DO 5 times. CALL METHOD OF application 'Worksheets' = source_sheet EXPORTING #1 = 1. " 索引1表示第一个工作表 * 2. 获取当前最后一个工作表作为锚点 GET PROPERTY OF application 'Worksheets' = sheets. " 获取工作表集合 GET PROPERTY OF sheets 'Count' = sheet_count. " 获取总表数 CALL METHOD OF sheets 'Item' = last_sheet EXPORTING #1 = sheet_count. " 按索引获取最后一个工作表 ** 3. 复制到最后一个工作表之后 CALL METHOD OF source_sheet 'Copy' EXPORTING #2 = last_sheet. " #2对应After参数(按位置传递) GET PROPERTY OF sheets 'Count' = sheet_count. " 重新获取总数 CALL METHOD OF sheets 'Item' = new_sheet. lv_sheet_name = |Sheet_{ sy-index }|. CALL METHOD OF new_sheet 'Name' = lv_sheet_name. PERFORM fill_excel_data USING new_sheet 11 4 0 'Test'. ENDDO. ENDFORM. *&---------------------------------------------------------------------* *& Form FILL_EXCEL_DATA *&---------------------------------------------------------------------* * text *----------------------------------------------------------------------* * -->P_ENDFORM text *----------------------------------------------------------------------* FORM fill_excel_data USING iv_sheet type ole2_object i_row i_col bold p_value. * CALL METHOD OF workbook 'Worksheets' = iv_sheet * EXPORTING #1 = 'template'. " 默认名称 "CALL METHOD OF iv_sheet 'Name' = . CALL METHOD OF iv_sheet 'CELLS' = cell EXPORTING #1 = i_row #2 = i_col. IF sy-subrc <> 0. WRITE: / '获取单元格失败'. EXIT. ENDIF. * GET PROPERTY OF cell 'FONT' = font. * IF sy-subrc <> 0. * WRITE: / '获取字体属性失败'. * EXIT. * ENDIF. * SET PROPERTY OF font 'BOLD' = bold. SET PROPERTY OF cell 'VALUE' = p_value. IF sy-subrc <> 0. WRITE: / '设置单元格值失败'. EXIT. ENDIF. FREE OBJECT: cell, font. FREE OBJECT: new_sheet, last_sheet, source_sheet, sheets, workbook. ENDFORM. 请检查代码,并给出正确代码?
03-25
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值