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 【控制台常用方法】的更多相关文章

  1. PowerShell 之常用方法

    随笔分类 - 常用 [PowerShell]文件的解压与压缩 摘要:1 New-Item -ItemType File 1.txt -Force #新建文本文件 2 Compress-Archive ...

  2. PowerShell控制台输出符号+函数参数类型指定+文本内容读取

    There are several ways: Write-Host: Write directly to the console, not included in function/cmdlet o ...

  3. PowerShell控制台字体设置

    1.打开注册表: HKEY_CURRENT_USER\Console\%SystemRoot%_System32_WindowsPowerShell_v1.0_powershell.exe 2.找到键 ...

  4. chrom控制台常用方法

    console.assert对输入的表达式进行断言,只有表达式为false时,才输出相应的信息到控制台 . console.count(这个方法非常实用哦)当你想统计代码被执行的次数 console. ...

  5. PowerShell控制台快捷键

    按键 功能 ← 光标向左移动一个字符 Ctrl + ← 光标向左移动一个单词 → 光标向右移动一个字符 Ctrl + → 光标向右移动一个单词 Home键 光标移动到行首 End键 光标移动到行尾 D ...

  6. 如何在windows计划中调用备份sharepoint2010网站集的powershell脚本

    最近有个项目需要在在windows计划中使用powershell脚本备份sharepoint2010网站集,打开sharepoint的powershell执行命令管理界面的属性 查看: C:\Wind ...

  7. PowerShell处理RSS信息

    转载请注明出自天外归云的博客园:http://www.cnblogs.com/LanTianYou/ 环境:Windows Server 2012 EN(解决PowerShell控制台中文乱码问题:方 ...

  8. SharePoint 2010 最佳实践学习总结------第2章 SharePoint Windows PowerShell指南

    第2章 SharePoint Windows PowerShell指南 SharePoint 2010是SharePoint系列产品中第一个开始支持Windows PowerShell的产品,在以前的 ...

  9. Windows PowerShell ISE

    Windows PowerShell 集成脚本环境 (ISE) 是 Windows PowerShell 的主机应用程序.在 Windows PowerShell ISE 中,可以在单一 Window ...

随机推荐

  1. Mybatis-plus报Invalid bound statement (not found)错误

    错误信息 org.springframework.security.authentication.InternalAuthenticationServiceException: Invalid bou ...

  2. 象群游牧算法--EHO

    象群游牧算法的数学模型 象群的游牧行为非常复杂,但是其中一些行为可以帮助我们寻找全局最优解和局部最优解.对此,进行数学建模为: (1) 象群的每个部落都有固定数目的大象: (2) 每次迭代中,部落中都 ...

  3. [BUUCTF]REVERSE——[WUSTCTF2020]Cr0ssfun

    [WUSTCTF2020]Cr0ssfun 附件 步骤: 例行检查,无壳儿,64位程序,直接ida载入,检索程序里的字符串,根据提示跳转 看一下check()函数 内嵌了几个检查的函数,简单粗暴,整理 ...

  4. [BUUCTF]PWN——[V&N2020 公开赛]easyTHeap

    [V&N2020 公开赛]easyTHeap 附件 步骤: 例行检查,64位程序,保护全开 本地试运行一下,看看大概的情况,常见的堆的菜单 64位ida载入,main函数 最多只能申请7个ch ...

  5. CF20B Equation 题解

    Content 解方程 \(ax^2+bx+c=0\). 数据范围:\(-10^5\leqslant a,b,c\leqslant 10^5\). Solution 很明显上求根公式. 先来给大家推推 ...

  6. 【LeetCode】23. Merge k Sorted Lists 合并K个升序链表

    作者: 负雪明烛 id: fuxuemingzhu 个人博客:http://fuxuemingzhu.cn/ 个人公众号:负雪明烛 本文关键词:合并,链表,单链表,题解,leetcode, 力扣,Py ...

  7. 【LeetCode】703. Kth Largest Element in a Stream 解题报告(Python)

    作者: 负雪明烛 id: fuxuemingzhu 个人博客: http://fuxuemingzhu.cn/ 目录 题目描述 题目大意 解题方法 小根堆 日期 题目地址:https://leetco ...

  8. sql注入-整数型

    sql注入整数型   1.按照提示输入1,发现直接给出了SQL语句   2.使用order by判断字段数   首先使用order by 3 ,页面无回显,改为2之后页面显示正确.因此判断当前数据库当 ...

  9. ORA-14450: 试图访问已经在使用的事务处理临时表

    需要对临时表动态添加列,经常碰到表在事务中被使用的情况,如果可以的话,可以现在只用临时表的时候先truncate,这样可以终止事务对当前临时表的占用. execute immediate('trunc ...

  10. MySQL定时备份数据库方案

    MySQL数据备份 1.备份全部数据库的数据和结构 mysqldump -uroot -p123456 -A > /data/mysqlDump/mydb.sql 2.备份全部数据库的结构(加 ...