---
title: "【OS Windows】windows运维知识"
author: "Perrin Yong"
author_profile: https://www.pystone.net/profile/
published_by: "Perrin Yong"
canonical: https://www.pystone.net/notes/windows-ops-administration/
type: note
content_role: unspecified
visibility: public
id_stability: rename-stable
source_path: "10-计算机、信息技术与工程/03-软件工程与质量保障/CI-CD与质量保障/CI-CD工具链/【OS Windows】windows运维知识.md"
content_hash: 5c510fb5399ceaa5f0a10acd7d21efaa485851a57290ad70eabe409c88ebe12a
knowledge_version: 224c990773de.5fa8af6e39fa
site_commit: 224c990773de166d23a886306577dd90379529ce
notes_commit: 5fa8af6e39fa3891d1b9b4832bfa6c4e0ecaaf0a
---
# 【OS Windows】windows运维知识

﻿# 【OS Windows】windows运维知识

> 创建时间：2021/6/21 19:09

* cmd命令
    * 进程相关
    * 端口与网络
    * 内存与磁盘
  * 服务与端口
  * 其他技巧
    * 任务管理器
    * 防火墙相关
      * 防火墙日志查看
      * 防火墙入站规则

## cmd命令

### 进程相关

```csharp
string str1 = String.Empty;
string str2 = String.Empty;

str2 = String.Intern(sb.ToString());

if((object)str1==(object)str2)
    Console.WriteLine(&quot;The strings are equal.&quot;);
else
    Console.WriteLine(&quot;The strings are not equal.&quot;);

```

### 端口与网络

```csharp
string str1 = String.Empty;
string str2 = String.Empty;

str2 = String.Intern(sb.ToString());

if((object)str1==(object)str2)
    Console.WriteLine(&quot;The strings are equal.&quot;);
else
    Console.WriteLine(&quot;The strings are not equal.&quot;);

```

![assets/0025 - 【OS Windows】windows运维知识__resource-001-d8d5784a181d.png](/media/647326f3196fadb7d665.png)

查看端口是否通的

```csharp
string str1 = String.Empty;
string str2 = String.Empty;

str2 = String.Intern(sb.ToString());

if((object)str1==(object)str2)
    Console.WriteLine(&quot;The strings are equal.&quot;);
else
    Console.WriteLine(&quot;The strings are not equal.&quot;);

```

### 内存与磁盘

```csharp
string str1 = String.Empty;
string str2 = String.Empty;

str2 = String.Intern(sb.ToString());

if((object)str1==(object)str2)
    Console.WriteLine(&quot;The strings are equal.&quot;);
else
    Console.WriteLine(&quot;The strings are not equal.&quot;);

```

## 服务与端口

查看端口号占用：
netstat -ano

netsh http show servicestate

## 其他技巧

### 任务管理器

### 防火墙相关

#### 防火墙日志查看

防火墙和网络保护 -> Windows Defender防火墙属性 -> 日志

![assets/0025 - 【OS Windows】windows运维知识__resource-002-5aff06233876.png](/media/1359fbf60ab2884db1b3.png)

#### 防火墙入站规则

![assets/0025 - 【OS Windows】windows运维知识__resource-003-3dc7926d8e1b.png](/media/eb8c291099d12cd3ad43.png)

防火墙入站规则，可以开放某个端口，也可以对某个IP地址开放。
