ICode9

精准搜索请尝试: 精确搜索
  • This File Came From Another Computer And Might be Blocked2022-09-14 11:31:33

    This File Came From Another Computer And Might be Blocked Unblock-File Unblock-File [-Path] <String[]> Ref https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.utility/unblock-file?view=powershell-5.1

  • powerShell: ForEach & ForEach-Object 不同2022-09-13 16:31:57

    将输入管道传递到ForEach时,它是ForEach-Object的别名。但是当你将ForEach放在行的开头时,它是Windows PowerShell语句。 ForEach语句将所有项目预先加载到集合中,然后一次处理它们。ForEach-Object希望项目通过管道进行流传输,从而降低了内存需求,但同时也影响了性能。 包括一些性能度

  • 使用yarn或者npm报错无法执行脚本2022-09-08 12:34:12

    编辑器中启动项目,报如下错误: 原因首次在计算机上启动 Windows PowerShell 时,现用执行策略很可能是 Restricted(默认设置)。Restricted 策略不允许任何脚本运行。需要收到开启运行脚本 解决方法:1、win+x 打开PowerShell(管理员) 2、set-ExecutionPolicy RemoteSigned //设置为打开 3、

  • PowerShell教程 - 异步处理(Asynchronous Processing)2022-08-29 08:01:33

    更新记录 转载请注明出处。 2022年8月29日 发布。 2022年8月29日 从笔记迁移到博客。 异步处理(Asynchronous Processing) 休眠(Sleep)指定时间 Start-Sleep 实例: 休眠1秒 Start-Sleep -Seconds 1

  • PowerShell教程 - 模块管理(Modules Management)2022-08-29 08:01:18

    更新记录 转载请注明出处。 2022年8月29日 发布。 2022年8月29日 从笔记迁移到博客。 模块管理(Modules Management) 模块和管理单元(Modules and Snap-Ins) Modules were introduced with the release of PowerShell version 2.0 Modules represented a significant step forward o

  • PowerShell教程 - 程序性能和BUG分析工具2022-08-29 08:01:01

    更新记录 转载请注明出处。 2022年8月29日 发布。 2022年8月29日 从笔记迁移到博客。 程序性能和BUG分析工具 https://hibernatingrhinos.com/products/efprof https://stackify.com/retrace/ https://stackify.com/prefix/

  • PowerShell教程 - 系统维护(System Maintain)2022-08-28 08:31:27

    更新记录 转载请注明出处。 2022年8月28日 发布。 2022年8月28日 从笔记迁移到博客。 系统维护(System Maintain) 显示已安装的补丁 Get-HotFix 实例: 按安装的日期排序 Get-HotFix | Sort-Object -Property InstalledOn 查看指定的补丁是否已经安装 Get-HotFix -id kb2741530

  • PowerShell教程 - Web requests(Web请求)2022-08-28 08:31:04

    更新记录 转载请注明出处。 2022年8月29日 发布。 2022年8月29日 从笔记迁移到博客。 Web requests(Web请求) 发起Web请求 A background in web requests is valuable before delving into interfaces that run over the top of Hyper-Text Transfer Protocol (HTTP). Invoke-WebR

  • PowerShell教程 - 系统定时任务管理(Schedule Task)2022-08-25 08:30:26

    更新记录 转载请注明出处。 2022年8月25日 发布。 2022年8月18日 从笔记迁移到博客。 实例: $taskAction = New-ScheduledTaskAction -Execute pwsh.exe ` -Argument 'Write-Host "hello world"' $taskTrigger = New-ScheduledTaskTrigger -Daily ` -At '00:00:00' Register-

  • PowerShell2022-08-23 19:33:40

    前提:先通过微软商店安装 Windows Terminal 和 PowerShell 配置文件 修改配置文件 配置文件修改如下(由于几乎只有 PowerShell 与 Windows 完美契合,所以其他终端的配置都删掉了): 安装插件等(下载如果很慢的话则需要魔法) 打开安装的PowerShell,执行如下命令: # 安装 Oh My Posh(

  • PowerShell教程 - 服务管理(Service Management)2022-08-23 08:04:19

    更新记录 转载请注明出处。 2022年8月23日 发布。 2022年8月18日 从笔记迁移到博客。 服务管理(Service Management) 获得服务 Get-Service 实例: Get-Service -Name M* 停止服务 Stop-Service 创建新服务 New-Service 设置服务 Set-Service 开启服务 Start-Service 停止服务

  • PowerShell教程 - 网络管理(Network Management)2022-08-23 08:04:01

    更新记录 转载请注明出处。 2022年8月23日 发布。 2022年8月18日 从笔记迁移到博客。 网络管理(Network Management) 获得网卡信息 Get-NetAdapter 测试网络连通性 实例: 获得打开的网络接口 if ($interface = Get-NetAdapter | Where-Object Status -eq 'Up') { Write-Host "$(

  • ssh之powershell2022-08-22 19:04:33

    什么是SSH? SSH(secure shell)是建立在应用层基础上的安全网络协议,它是专门为远程登录会话和其他网络服务提供安全性的协议,可以有效弥补网络中的漏洞。 通过SSH,可以把所有传输的数据进行加密,也能够防止DNS欺骗和IP欺骗,同时存在一个额外的好处就是传输的数据是经过压缩的,因此可

  • PowerShell教程 - 数值管理(Working With Number)2022-08-22 08:33:38

    更新记录 转载请注明出处。 2022年8月22日 发布。 2022年8月18日 从笔记迁移到博客。 数值管理(Working With Number) 生成随机数 Get-Random 实例: 限制范围: 注意:包括最小数,但不包括最大数 Get-Random -Minimum 0 -Maximum 2 限制个数: Get-Random -Count 2

  • PowerShell教程 - 进程管理(Process Management)2022-08-22 08:33:03

    更新记录 转载请注明出处。 2022年8月22日 发布。 2022年8月18日 从笔记迁移到博客。 进程管理(Process Management) 开启进程 Start-Process 结束进程 Stop-Process 等待进程 Wait-Process 获得进程 Get-Process 实例: 获得指定名称的进程 Get-Process powershell Get-Process

  • PowerShell教程 - 编程结构(Program Struct)- 第一部分2022-08-21 09:02:41

    更新记录 转载请注明出处。 2022年8月21日 发布。 2022年8月18日 从笔记迁移到博客。 变量(Variables) 变量说明 A variable may be of any .NET type or object instance PowerShell并没有对变量有太多限制 不需要在使用变量前对其进行显式声明或定义 可以使用中更改变量值的类型

  • PowerShell教程 - 编程结构(Program Struct)- 第三部分2022-08-21 09:01:45

    更新记录 转载请注明出处。 2022年8月21日 发布。 2022年8月18日 从笔记迁移到博客。 预定义变量 预定义的布尔值 $True $False 预定义变量 预定义变量 描述(Description) $^ 表示当前会话的使用过的最后一条命名的最前部分 $$ 表示当前会话的使用过的最后一条

  • PowerShell教程 - 编程结构(Program Struct)- 第五部分2022-08-21 09:01:16

    更新记录 转载请注明出处。 2022年8月21日 发布。 2022年8月18日 从笔记迁移到博客。 枚举类型 定义枚举类型(Defining an enumeration) 简单的定义 enum MyEnum { Zero One } 设置明确的值 enum Direction { Up = 1 Down = 2 Left = 3 Right = 4 } 还可以单个值对应多个

  • PowerShell教程 - 编程结构(Program Struct)- 第四部分2022-08-21 09:00:46

    更新记录 转载请注明出处。 2022年8月21日 发布。 2022年8月18日 从笔记迁移到博客。 分支结构(Branching) if语句(if Statement) if(条件) { #code } 实例: $userInput = Read-Host "Input Number"; if([int]$userInput -eq 666) { "Panda666.com" | Out-Default; } if-else

  • PowerShell教程 - 入门命令(Basic Comlet)2022-08-20 08:31:06

    更新记录 转载请注明出处。 2022年8月20日 发布。 2022年8月15日 从笔记迁移到博客。 入门命令(Basic Comlet) 帮助信息 命令的帮助说明信息的组成结构 name, synopsis, syntax, description, related links, and remarks 名称,概要,语法,描述,相关链接,注释 获得帮助 Get-Help 获得在

  • PowerShell教程 - 编程结构(Program Struct)- 第二部分2022-08-20 08:30:45

    更新记录 转载请注明出处。 2022年8月20日 发布。 2022年8月15日 从笔记迁移到博客。 字符串(String) 说明 本质就是 .NET System.String type 使用字符串的索引(Indexing into strings) $myString = 'abcdefghijklmnopqrstuvwxyz' $myString[0] # This is a (the first character i

  • PowerShell教程 - PowerShell编辑器(PowerShell editors)2022-08-19 08:01:25

    更新记录 转载请注明出处:https://www.cnblogs.com/cqpanda/p/16589935.html 2022年8月19日 发布。 2022年8月15日 从笔记迁移到博客。 PowerShell编辑器(PowerShell editors) 说明 常用PowerShell编辑器: Visual Studio Code (VS Code) PowerShell Studio PowerShell ISE Windows

  • PowerShell教程 - Cmdlet2022-08-19 08:01:14

    更新记录 转载请注明出处:https://www.cnblogs.com/cqpanda/p/16589932.html 2022年8月19日 发布。 2022年8月15日 从笔记迁移到博客。 Cmdlet概念 Cmdlet说明 Windows PowerShell 引入了 cmdlet(读作“command-let”)的概念 它是内置于 Shell 的简单的单一函数命令行工具 可以分

  • PowerShell教程 - PowerShell安装与启动(PowerShell Install)2022-08-19 08:01:01

    更新记录 转载请注明出处:https://www.cnblogs.com/cqpanda/p/16589931.html 2022年8月19日 发布。 2022年8月15日 从笔记迁移到博客。 PowerShell安装与启动(PowerShell Install) 安装PowerShell Core Windows带GUI下安装MSI包方式 选择对应系统下载PowerShell(里面有编译好的安装

  • Windows PowerShell 使用2022-08-18 19:01:55

    启动PowerShell 开始菜单 搜索 win+r 运行 get-help 查看帮助 get-command 查看有哪些命令 get-command      缩小范围 get-command get-* get-command "*process*" / get-command *process* get-hel

专注分享技术,共同学习,共同进步。侵权联系[81616952@qq.com]

Copyright (C)ICode9.com, All Rights Reserved.

ICode9版权所有