Powershell 【控制台常用方法】
1 function Pause(){
2 [System.Console]::Write('按任意键继续...')
3 [void][System.Console]::ReadKey(1)
4 }
5 [System.Console]::Title='控制台常用方法'
6 0..15|ForEach-Object{
7 [System.Console]::SetCursorPosition($_,$_)
8 [System.Console]::BackgroundColor=15-$_
9 [System.Console]::ForegroundColor=$_
10 $_
11 [System.Console]::SetCursorPosition(15+$_,15-$_)
12 [System.Console]::BackgroundColor=$_
13 [System.Console]::ForegroundColor=15-$_
14 15-$_
15 }
16 [System.Console]::ResetColor()
17 [System.Console]::SetWindowSize(80,30)
18 [System.Console]::SetCursorPosition(0,16)
19 pause
Powershell 【控制台常用方法】的更多相关文章
- PowerShell 之常用方法
随笔分类 - 常用 [PowerShell]文件的解压与压缩 摘要:1 New-Item -ItemType File 1.txt -Force #新建文本文件 2 Compress-Archive ...
- PowerShell控制台输出符号+函数参数类型指定+文本内容读取
There are several ways: Write-Host: Write directly to the console, not included in function/cmdlet o ...
- PowerShell控制台字体设置
1.打开注册表: HKEY_CURRENT_USER\Console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe 2.找到键 ...
- chrom控制台常用方法
console.assert对输入的表达式进行断言,只有表达式为false时,才输出相应的信息到控制台 . console.count(这个方法非常实用哦)当你想统计代码被执行的次数 console. ...
- PowerShell控制台快捷键
按键 功能 ← 光标向左移动一个字符 Ctrl + ← 光标向左移动一个单词 → 光标向右移动一个字符 Ctrl + → 光标向右移动一个单词 Home键 光标移动到行首 End键 光标移动到行尾 D ...
- 如何在windows计划中调用备份sharepoint2010网站集的powershell脚本
最近有个项目需要在在windows计划中使用powershell脚本备份sharepoint2010网站集,打开sharepoint的powershell执行命令管理界面的属性 查看: C:\Wind ...
- PowerShell处理RSS信息
转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 环境:Windows Server 2012 EN(解决PowerShell控制台中文乱码问题:方 ...
- SharePoint 2010 最佳实践学习总结------第2章 SharePoint Windows PowerShell指南
第2章 SharePoint Windows PowerShell指南 SharePoint 2010是SharePoint系列产品中第一个开始支持Windows PowerShell的产品,在以前的 ...
- Windows PowerShell ISE
Windows PowerShell 集成脚本环境 (ISE) 是 Windows PowerShell 的主机应用程序.在 Windows PowerShell ISE 中,可以在单一 Window ...
随机推荐
- 【C/C++】链表
#include <bits/stdc++.h> using namespace std; struct node { int data; // 数据 node* next; // 指针 ...
- 【C/C++】最长不下降子序列/动态规划
#include <iostream> #include <vector> using namespace std; int main() { //输入 int tmp; ve ...
- 【JAVA今法修真】 第一章 今法有万象 百家欲争鸣
大家好,我是南橘,因为这段时间很忙,忙着家里的事情,忙着工作的事情,忙着考试的事情,很多时候没有那么多经历去写新的东西,同时,也是看了网上一些比较新颖的文章输出方式,自己也就在想,我是不是也可以这样写 ...
- hibernate多对多单向(双向)关系映射
n-n(多对多)的关联关系必须通过连接表实现.下面以商品种类和商品之间的关系,即一个商品种类下面可以有多种商品,一种商品又可以属于多个商品种类,分别介绍单向的n-n关联关系和双向的n-n关联关系. 单 ...
- Sentry 监控 - 私有 Docker Compose 部署与故障排除详解
内容整理自官方开发文档 系列 1 分钟快速使用 Docker 上手最新版 Sentry-CLI - 创建版本 快速使用 Docker 上手 Sentry-CLI - 30 秒上手 Source Map ...
- Gitlab-CICD实践篇
一.背景 随着公司项目使用gitlab越来越多,业务发布的次数越来越频繁,对于发布效率提出了更高的要求.从2012开始,Gitlab官方开始集成了Continuous Integration (CI) ...
- BIT 常态化在线CTF系统 pwn题目
偶然得到这个平台,发现是BIT的CTF平台,应该是平时的阶段性的训练题目.看了看题,其他方向的题目感觉都是入门题,但是pwn题目,发现还是比入门题难一点点的,来记录一下. pwn1 栈上任意位置的读写 ...
- navicat模型分享方法
一. 查看模型保存路径选中模型如:<app-订单模型>,点击右键,对象信息,可以看到文件位置:C:\Users\Administrator\Documents\Navicat\Premiu ...
- 复杂SQL案例:用户退款信息查询
供参考: select t3.course_id 课程id, t3.user_id 用户ID, u.user_full_name 姓名, -- u.phone, concat(u.company,' ...
- JAVAWeb项目实现在线预览、打开office文件
Web项目实现在线预览浏览word.ppt.excel文档方法 调用以下链接 https://view.officeapps.live.com/op/view.aspx?src=你的文档绝对路径 这里 ...