powerShell
- get-help *-*
- get-host power主机信息
- $C=Get-Credential –Credential powershell;Enter-PSSession –ComputerName 192.168.1.200 –Credential $C
- "{0}.{1}" -f $env:COMPUTERNAME, $env:USERDNSDOMAIN
- Get-NetIPInterface 列出网卡索引号 。使用如下命令就可以配置指定网卡(索引号)的优先级值,即直接配置接口跃点数值 Set-NetIPInterface -InterfaceIndex 21 -InterfaceMetric 10
- 复制文件夹所有内容 copy a -recurse b
- 重命名文件夹中所有文件名称
$a=Get-ChildItem -Force -Recurse 
 foreach($b in $a)
 { $c=[System.IO.Path]::GetFileNameWithoutExtension($b.name)+"-"+(get-random -min 10000000) +[System.IO.Path]::GetExtension($b.name)
 Rename-Item $b -NewName $c -Force
 }
- 打印文件名称 Get-ChildItem| select-object Name
 
                    
                     
                    
                 
                    
                 
                
            
         
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号