在Windows 8或Windows 2012 R2上, 使用下面的命令:

Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False

在更早版本的Windows上, 使用netsh命令:

netsh advfirewall set allprofiles state on

 

资料来源

================

PowerTip: Use PowerShell to Enable the Windows Firewall

http://blogs.technet.com/b/heyscriptingguy/archive/2012/10/28/powertip-use-powershell-to-enable-the-windows-firewall.aspx

关掉Windows Firewall的PowerShell的更多相关文章

  1. Turn Off Windows Firewall Using PowerShell and CMD

    If you want to turn off the Windows Firewall, there are three methods. One is using the GUI which is ...

  2. win7防火墙打不开(无法启动windows firewall服务)

    点击windows 7控制面板中防火墙的“推荐配置”没有反应:打开“服务”,无法启动windows firewall,并报错.  可能很多的win7用户都碰到过这样的一种情况,那就是win7的防火墙打 ...

  3. windows defender和windows firewall

    Windows defender: Windows Defender,曾用名Microsoft Anti Spyware,是一个杀毒程序,可以运行在Windows XP和Windows Server ...

  4. 黑科技抢先尝(续2) - Windows terminal中Powershell Tab的极简美化指南

    目录 安装python 安装git 安装powerline字体 主题定制 安装oh-my-posh 查看策略组的执行权限 使用choco 安装终端模拟器 - ConEmu 优化 PowerShell ...

  5. SQL Server: Windows Firewall with Advanced Security

    SQL Database Engine: TCP 1433 & UDP 1434 SQL Analysis Service: TCP 2383 (2382 if named instance) ...

  6. Programmatically add an application to Windows Firewall

    Programmatically add an application to Windows Firewall 回答1   Not sure if this is the best way, but ...

  7. windows cannot find powershell.exe windows 7

    This can happen when the environment variables are missing an entry for Powershell. $env:path must i ...

  8. [Windows] [Firewall] 增加进入规则

    netsh advfirewall firewall add rule name="Open Port 80" dir=in action=allow protocol=TCP l ...

  9. Windows中查看PowerShell版本和virbox版本,vagrant 版本

    我并不是很熟悉什么是PowerShell,但是有种直觉是:如果想在Windows中使用系统自带的功能取代bash shell,PowerShell或许是比DOS批处理更好的选择.不过,从头开始再来一门 ...

随机推荐

  1. 【BZOJ 3028】 3028: 食物 (生成函数)

    3028: 食物 Time Limit: 3 Sec  Memory Limit: 128 MBSubmit: 569  Solved: 382 Description 明明这次又要出去旅游了,和上次 ...

  2. JavaScript正则表达式在不同浏览器中可能遇到的问题

    这两天在用正则表达式搞一个稍微有点复杂的东西,但是不同浏览器之间的差异可浪费了我不少的人参. 现在我把正则表达式在五大主流浏览器(IE.firefox.Chrome.Safari.Opera,以当前版 ...

  3. C#中执行Dos命令

    //dosCommand Dos命令语句 public string Execute(string dosCommand) { ); } /// <summary> /// 执行DOS命令 ...

  4. Ubuntu 14 安装Java(JRE、JDK)、Maven

    JRE vs OpenJDK vs Oracle JDK JRE(Java Runtime Environment),它是你运行一个基于Java语言应用程序的所正常需要的环境.如果你不是一个程序员的话 ...

  5. Linux声卡驱动框图

    1.声卡驱动注册完成后的框图 2.open & hw_params 完.

  6. 完美.PCK文件不完全详解

    building.pck:建筑物 configs.pck:配置文件interface.pck:玩过魔兽的都晓得这个是什么~interface顾名思义·facedata.pck,人物脸型,细节.不要改, ...

  7. Property's synthesized getter follows Cocoa naming convention for returning

    Property's synthesized getter follows Cocoa naming convention for returning.   今天早上在整理代码的时候发现了如上警告. ...

  8. Arcgis Pro为什么我已经安装了汉化包但是显示的还是英文?

  9. android studio一直卡在Gradle:Executing tasks

    http://www.eoeandroid.com/forum.php?mod=viewthread&tid=554227 新建了个hello world项目,运行就卡在Gradle:Exec ...

  10. WordPress主题开发:更换后台编辑器

    这里我更换为KindEditor 1.下载插件 https://wordpress.org/plugins/kindeditor-for-wordpress/ 2.解压至wordpress目录下的/w ...