PowerShell实现在控制台中插入绿色的打勾符号                
                
                
                
                    摘要:在前面的PowerShell技巧中,我们看到了PowerShell控制台支持输出所有TrueType字体的字符,你只需将你的字符代码转换成C...                
                在前面的PowerShell技巧中,我们看到了PowerShell控制台支持输出所有TrueType字体的字符,你只需将你的字符代码转换成Char类型。今天再来一个更高级的例子,让用户在控制台中插入绿色的打勾符号。
$greenCheck = @{ Object = [Char]8730 ForegroundColor = 'Green' NoNewLine = $true } Write-Host "Status check... " -NoNewline Start-Sleep -Seconds 1 Write-Host @greenCheck Write-Host " (Done)"
所以,什么时候想使用绿色的对号了,只需:
Write-Host @greenCheck
【PowerShell实现在控制台中插入绿色的打勾符号】相关文章:
★ Powershell小技巧--将文件夹中的大文件分成若干份
★ PowerShell脚本中控制Windows DNS服务的方法
                        上一篇:
                        PowerShell中终止管道的方法
                    
                    
                