-
最近网上看到了电子邮箱的新利用方法如题,下载了几个此类软件,发现好几个不是不好用,就是功能不全。上博客园搜了一下,那么可以看到有使用java和python实现的,这里我们用Windows的批处理实现。我们要实现的最基础的功能,自然是执行cmd命令,有了这个其他都好说。Windows批处理的优点:1.一个批处理文件,配合第三方批处理等,在几乎所有Windows电脑上,可以直接运行。2.代码编写容易,逻辑比较简单,基本上都是cmd命令。批处理的缺点:1.我们远程控制,邮件发送过来的也是命令,由于Windows命令解释的预处理机制,会把原批处理命令和发送的命令(变量)混在一起。此处会涉及到不是非常复杂、但总是令人晕头转向的空格问题、引号问题、转义问题等。2.上面这步若没有处理好,很容易发生语法错误。如果是较轻的错误,命令完成还能给你返回一个errorlevel,若是比较严重的语法错误,可能直接导致命令行闪退。(就什么都没有了。)for和if命令最易出现此问题。1.收发邮件Windows不自带能够通过命令行收发邮件的程序,因此我们的程序需要自带第三方命令行。这里我们使用工具getmail来接收邮件。getmail使用pop3协议,可以将邮件下载为txt,并下载其附件。发送邮件则使用blat进行。blat使用SMTP发送邮件,同样支持上传附件。可以通过输入--help或/?来获取它们的详细用法,可以参考这篇或者参考这篇。虽然翻译不是非常专业。下面仅简单说明一下。getmail收邮件的用法帮助文件中的参数我们不是每一个都用到。下面介绍的是本例中用到的几个。-u <userid>指定登录的邮箱账号-pw <password>登录密码。在国内常见的几个邮箱都不是使用邮箱账号密码来直接作为pop3/imap的密码,通常需要你自己到设置页面获取。-s <server>pop3服务器。可以在各邮箱有关设置页面找到。-delete下载后删除下载的邮件。不加此参数则不删除。-xtract下载邮件带有的附件,并且解码邮件内容的明文。不加此参数则不会下载附件,也不会解码明文,只会下载一个MSG文件,含有附件的有关信息,并且保存邮件内容经过base64编码后得到的字符串。-headersonly只下载邮件头部信息,即发送者、接收者、邮件subject等。理论上这会加快获取的速度。-n <n>总共获取n封邮件。貌似是从最早收到的一封邮件开始数。getmail还可以将配置写入注册表,以后每次都使用注册表中的配置,可以简化参数,不过我这次没有使用。因此我们配置好上述参数后,获得的回显如下(此次服务器上没有任何邮件):Failed to open registry key for GetMail profile , using default.Failed to open registry key for GetMailGetting *********@sina.cn's mailbox contents from server pop.sina.cn:110There are 0 messages on the server.blat发邮件的使用参数非常多。想看详细的同样可以去访问上面说过的页面,这里只介绍会用到的。<filename>直接写在命令后面的第一个参数,指定一个文本文件,其中的内容会作为邮件的内容若不想从文件指定发送内容,在上面这个参数只输入-,之后可以在后面加一个参数-body "<邮件的内容>"。-to <address>收件人的电邮地址。-charset <cs>文本编码。为了正确发送中文,我们固定要加的一个参数-charset gbk指定使用GBK编码。-subject邮件的主题。-server输入smtp服务器地址,可以在邮箱设置界面找到。-ffrom的缩写,指定登录用来发件的邮箱。-u登陆邮箱用的用户名。大部分是你邮件地址@前的部分,若登录不成功请翻找邮箱的帮助界面。-pw登录密码。与上文getmail的密码相同。-attach附加附件到邮件。2.电脑使用的邮箱我们的策略是电脑独立使用一个邮箱地址,你可以使用其他的邮箱向这个地址发件来实现控制。我推荐电脑使用的是新浪邮箱,一个手机号可以注册多个独立邮箱。并且连接比较稳定,很少出现获取/发送不成功的情况,5s的获取邮件间隔毫无压力,不会遭到阻止。发件的邮箱几乎没有什么限制了,但是钉钉自带的钉邮在这里无法使用,因为会将邮件的subject也一起加密(或者是使用了utf8编码什么的,记不清了),批处理直接读取比较麻烦。目前试过好用的是阿里邮箱和qq邮箱。163应该是好用,但是没试过。3.原理概述3.1执行命令由于在getmail接收到的文本文件里,subject没有加密,而content经过base64编码了。所以一开始的计划是只读取subject,命令全部放到subject里。程序首先要实现的功能是执行cmd命令,后面我们还会加几个自定义功能,需要通过命令来指定我们这里选择的功能。这里我的实现方法是使用#号分隔,功能选择用第一个#包裹,加的参数放在第二个#后面。批处理中可以使用for命令分别取得这两个字符串。例如,我们将执行cmd命令的功能命名为cmd,需要执行命令start a.exe那么我们发邮件的主题会输入成:#cmd#start a.exe这个邮件经过getmail下载后,出现在MSG1.TXT文件里的一行是:Subject: #cmd#start a.exe我们通过for来解读输入:echo off for /f "tokens=2,* delims=#" %%i in ('type MSG1.TXT ^| findstr /b Subject:') do ( set mode=%%i set para="%%j" ) echo mode:%mode% echo command:%para% pause得到结果:mode:cmdcommand:"start a.exe"之后我们调用cmd执行这个命令即可。这里最好是新开一个cmd。加min最小化运行。1start /MIN cmd.exe /c %para%我们也可以调用另一个bat文件,这样也会新开一个cmd窗口。同时可以写入一些命令一并执行,还可以将回显输入到文件中,再利用blat发送出去,这样邮件端也可以看到回显。同时,执行其他功能时也最好都新开一个批处理运行。这样若执行命令耗时较长,或者执行的命令一直在后台运行时,不会阻断检查邮件的进程,仍然可以邮件执行其他命令。3.2文件传输这就比较简单了。getmail只要加上-xtract参数,就会直接下载附件。要使用blat上传附件,我们可以将其命名为upfile功能,使用if判断%mode%,若为upfile就调用另一个批处理执行blat,将发送的文件名附加到-attach即可。利用这个功能,我们也可以发送批处理文件,将多个命令写入文件实现命令批量执行。通过start命令调用这个批处理即可。需要注意的是,一些邮箱(比如新浪邮箱就是)会自动拦截bat扩展名等一些可执行程序作为附件的邮件。解决方法也很简单,可以更改文件扩展名再发送,例如改为.txt。附件接收之后,再通过邮件执行重命名命令,改回扩展名,即可运行。3.3含有中文的命令带有中文subject无法在msg文件中直接显示。例如会显示为:Subject: =?UTF-8?B?4oCq4oCqZGltb0BhbGl5dW4uY29t4oCs4oCs?=这样解码就比较麻烦。而下面的content使用base64解码之后就能直接看到中文,getmail的-xtract参数添加后也会自动将内容给解码出来,比较方便。因此我们可以在邮件正文中输入命令,程序读取后执行。然而getmail解码出来的内容是html(点击查看详细),这个批处理想要直接读取文本比较麻烦。前面这个页面也有解决方法。3.4隐藏运行也比较简单。使用vbs命令即可实现完全隐藏cmd的黑框,同时还能顺便获取UAC管理员权限。此处假设我们要运行的是run.bat:REM 仅隐藏运行 echo set ws=WScript.CreateObject("WScript.Shell") > start.vbs echo ws.Run "%~dp0run.bat /start",0 >> start.vbs start.vbs del /f /q start.vbs REM 隐藏运行并获取管理员权限 ECHO SET UAC = CreateObject^("Shell.Application"^) > Getadmin.vbs ECHO UAC.ShellExecute "run.bat", "此处可以加一个参数", "", "runas", 0 >> Getadmin.vbs Getadmin.vbs del /f /q Getadmin.vbs3.5开机运行&防止关闭开机运行可以通过设置任务计划实现。可以使用任务计划程序来窗口化配置任务,也可以使用schtasks命令,编写一个批处理实现一键添加任务。同时我们还可以在程序启动时发送提醒邮件,实现对开机时间的监控。rem 此处需要开机启动的批处理文件为startgo.bat set file='%~dp0startgo.bat' schtasks /Create /SC ONLOGON /TN \Windows\MailService /TR "%file%" /F /RL HIGHEST /DELAY 0001:00 rem 延时启动用于防止电脑还未联网导致开机邮件发送失败 pause有关防止进程被杀死,问题,欢迎点击此处,或者参考。3.6配置文件由于许多不同的批处理文件都要实现接受/发送邮件,我们需要将邮箱地址、登录用户名、密码都写入一个配置文件中,便于邮件收发。当然也可以使用程序将配置储存在注册表的功能。在配置文件中,我们只需要将不同的配置写入单独一行即可用批处理分别读取,这样也便于文件的编辑。利用for命令可以读取文件的每一行并对每行执行相同的操作。想要使用for读取单独一行的内容,需要在执行的末尾添加goto跳出for命令。多次使用这样的for即可读取到配置文件各个行的内容。有关内容可见网页链接。3.7更多功能我们还可以添加更多实用的功能,通过if判断和goto跳转到功能。例如,我们想要通过命令弹出一个提示框,代码比较长,输入不方便。mshta vbscript:msgbox("content",64,"title")(window.close) 此时就可以将命令保存到bat中。把功能命名为popup,使用if判断%mode%即可。跳转后执行对应的bat文件,并将显示的内容作为参数输送给bat。例如我们规定用$作分隔字符,则发送邮件时输入:#popup#title$64$content主程序按照#分隔输入,判断出需要跳转到popup;之后popup.bat会接收到输入:"title$64$content"此时再按$分割输入,即可得到每部分内容,并用于弹窗:echo off for /f "tokens=1,2,3 delims=$" %%i in ('echo %~1') do ( set tit=%%i set num=%%j set text=%%k ) mshta vbscript:msgbox("%text%",%num%,"%tit%")(window.close) exit
-
问题原因:在windows server 2012/2016/2019 环境中, 使用Studio2.18以及之前版本发布功能时出现提示文件校验IO异常,打开 webService.log 后台日志文件查看时,出现 Failed to get temporary dirpath 的异常日志。如下图所示问题检查:cmd终端运行“echo %TEMP%",回车后出现路径 " C:\Users\用户名目录\AppData\Local\Temp\2"可能原因:未设置“不对每个会话使用临时文件夹”【解决办法】1. 打开“cmd运行”窗口,并输入 gpedit.msc 以打开“本地组策略编辑器”窗口。2. 在左侧导航栏中选择“本地计算机策略>计算机配置>管理模板>Windows 组件>远程桌面服务>远程桌面会话主机>临时文件夹”3. 在“设置”区域,右键单击“不对每个会话使用临时文件夹”,并选择“编辑”。4. 在弹出的窗口中,单击“已启用”。5. 单击“应用”后,再单击“确定”。6. 重启计算机,使配置生效。计划在2022Q2版本解决。
-
如果你是Windows 7用户,那么将Windows 7升级至Windows 10可能是近期需要面临的问题。微软官方已于2020年1月14日停止对Windows 7的支持,Windows 7虽然还可以继续使用,但随着时间的推移,即使出现病毒,用户也无法获得安全更新。所以升级至Windows 10是比较稳妥的选择,毕竟现在升级是免费的。安装Windows 10 如何从Windows 7升级至Windows 10,可点此查看 。 不过对于部分用户而言,升级虽然方便,但可能存在软件兼容性问题,而且升级后,原本系统中的垃圾文件仍旧存在,无法给人一种“从头开始”的感觉。我就属于这一类人,让我升级系统,我宁愿格盘重新安装。本文就为这类Windows 7用户提供重新安装Windows 10的方法。重装Windows 10前的检查 一般情况下,能够运行Windows 7的电脑可以比较流畅的运行Windows 10,毕竟两者对于硬件的要求非常相近。从微软公布的信息来看,Windows 10对于硬件的要求,与Windows 7唯一不同是,64位系统所需硬盘空间为32GB,而Windows 7为20GB。只要大家确保自己的硬盘容量在32GB以上,就可以安装Windows 10。官方镜像、官方工具最放心 想要重装的话,一个比较头疼的问题是,如何才能下载到官方镜像。为了从源头解决这个问题,我选择的重装方法完全从微软官方取材,使用微软官方提供的工具制作系统U盘进行重装。这样的好处有两个:第一是系统绝对来自微软官方,第二是制作过程非常简单,不必安装类似软碟通这样的工具。 进行操作之前,先准备一个容量至少为8GB的U盘,并将其格式化,格式化时选择Fat32文件系统。准备一个U盘 第一步,下载微软官方制作系统启动盘工具。点此打开微软官网下载Windows 10页面,点击立即下载工具按钮,此时会下载一个名为“MediaCreationTool1909.exe”运行文件。如果浏览器无法自动下载,可将跳转后的链接复制到迅雷、百度网盘等下载工具进行下载。下载完成后双击打开就可以了。如果遇到出错情况,可尝试将DNS修改为8.8.8.8,具体操作为:右击网络图标→更改适配器选项→双击正在使用的网络适配器→属性→双击Internet协议版本4→使用下面的DNS服务器地址→首选DNS服务器。下载官方工具 第二步,选择要下载的Windows 10版本。打开软件之后,将U盘插入电脑。首先会看到许可条款,点击接受,然后选择“为另一台电脑创建安装介质”,选择要安装的Windows版本,然后选择U盘,之后软件会自动将U盘制作成系统盘。制作速度与网速和U盘速度有关。此时不影响电脑正常使用。选择制作系统U盘 第三步,重启电脑引导U盘启动。系统U盘制作完成之后,先查找电脑选择引导U盘启动的方法,一般为快捷键,不同品牌整机、主板快捷键并不相同。知道如果引导U盘启动之后,U盘插在电脑上进行重启,启动时快速、连续按引导U盘启动按键,此时会看到启动项,选择U盘启动即可。引导U盘启动 第四步,将Windows 10安装至目标硬盘。成功引导U盘启动之后,一切就如同安装软件一样,非常简单。稍微有一点需要注意,在执行哪种类型安装时,选择自定义:仅安装Windows,之后选择目标硬盘,将其格式化之后点击下一步,然后只需要等待就可以了。安装过程中,电脑会重启2-3次,之后就能看到Windows 10的设置页面,按照自己需求进行设置即可。安装Windows 10 以上就是如何重新安装Windows 10。由于这种做法是格盘重新安装,所以安装后的Windows 10系统只是试用版。如果没有激活码的话,一样可以用,只不过会有激活Windows的水印。所以更建议大家,先通过升级的方法保证升级后的Windows 10是正版,然后再重新安装,这样重新安装的Windows 10一连网,就会自动激活。
-
Windows Server 2008 R2各版本硬件支持信息(以下版本华为云都有提供) 特征StandardWebEnterpriseDatacenter最大内存支持(x86-64)32 GB32 GB2 TB2 TB最大物理CPU数448642. Windows Server 2012 R2各版本硬件支持信息(以下版本华为云都有提供)特征StandardDatacenter最大内存支持(x86-64)4TB4 TB最大物理CPU数64643. Windows Server 2016各版本硬件支持信息(以下版本华为云都有提供)特征StandardDatacenter最大内存支持(x86-64)24TB24 TB最大物理CPU数不限制不限制
-
本帖最后由 达康书记 于 2018-6-12 19:12 编辑本文讲的是解决Windows Server由于操作系统默认管理员的SAN策略,该磁盘处于脱机状态,提示:由于管理员设置的策略,该磁盘处于脱机状态。 14494 磁盘脱机主要场景: 1、客户在购买弹性云服务器时多增加的一块硬盘,在磁盘管理器(disk-manager)里看到默认是脱机状态 2、对运行的虚拟机热插一块数据盘,在磁盘管理器(disk-manager)里看到默认是脱机状态 3、对携带数据盘的虚拟机做重启和强制重启,在磁盘管理器(disk-manager)里看到数据盘变成脱机状态 SAN策略中在离线有三种类型:在线,共享离线和离线: 1. 在线表示所有新发现磁盘都置于在线模式。 2. 共享离线表示所有共享总线上(比如FC, ISCSI)的新发现磁盘都置于离线模式,非共享总线上的磁盘都置于在线模式。 3. 离线表示所有新发现磁盘都置于离线模式。 PS: 据我查证,在Windows 2008和2012企业版和数据中心版,缺省值是共享离线模式,其它版本,缺省值是在线模式。 14500 对于当前虚拟机解决策略: 使用DISKPART工具来查询设置当前的SAN策略统一为Onlineall。 DOS> DISKPART DISKPART> san SAN 策略: 使用共享磁盘脱机 DISKPART> san policy=onlineall DISKPART> list disk ------列出所有磁盘 磁盘 0 磁盘 $ ....... DISKPART> select disk 1 ------所有磁盘都分别选择,并且按分别设置online模式 DISKPART> attributes disk clear readonly DISKPART> online disk DISKPART> select disk 2 DISKPART> attributes disk clear readonly DISKPART> online disk ...... DISKPART> exit 客户可以修改虚拟机SAN策略再封装私有镜像,永久生效: DISKPART DISKPART> san DISKPART> san policy=onlineall DISKPART> exit 具体例子: 14499 案例,修改SAN策略为Onlineall后热插磁盘直接默认就联机状态,如图,客户只要进行初始化和格式化即可使用,省去联机操作。 14497 14498
-
本帖最后由 达康书记 于 2018-3-31 10:32 编辑Memory Limits for Windows and Windows Server Releases https://msdn.microsoft.com/en-us/library/windows/desktop/aa366778(v=vs.85).aspx This topic describes the memory limits for supported Windows and Windows Server releases. [*]Memory and Address Space Limits [*]Physical Memory Limits: Windows 10 [*]Physical Memory Limits: Windows Server 2016 [*]Physical Memory Limits: Windows 8 [*]Physical Memory Limits: Windows Server 2012 [*]Physical Memory Limits: Windows 7 [*]Physical Memory Limits: Windows Server 2008 R2 [*]Physical Memory Limits: Windows Server 2008 [*]Physical Memory Limits: Windows Vista [*]Physical Memory Limits: Windows Home Server [*]Physical Memory Limits: Windows Server 2003 R2 [*]Physical Memory Limits: Windows Server 2003 with Service Pack 2 (SP2) [*]Physical Memory Limits: Windows Server 2003 with Service Pack 1 (SP1) [*]Physical Memory Limits: Windows Server 2003 [*]Physical Memory Limits: Windows XP [*]Physical Memory Limits: Windows Embedded [*]How graphics cards and other devices affect memory limits [*]Related topics Limits on memory and address space vary by platform, operating system, and by whether theIMAGE_FILE_LARGE_ADDRESS_AWARE value of the LOADED_IMAGE structure and 4-gigabyte tuning (4GT) are in use.IMAGE_FILE_LARGE_ADDRESS_AWARE is set or cleared by using the /LARGEADDRESSAWARE linker option.4-gigabyte tuning (4GT), also known as application memory tuning, or the /3GB switch, is a technology (only applicable to 32 bit systems) that alters the amount of virtual address space available to user mode applications. Enabling this technology reduces the overall size of the system virtual address space and therefore system resource maximums. For more information, see What is 4GT.Limits on physical memory for 32-bit platforms also depend on the Physical Address Extension (PAE), which allows 32-bit Windows systems to use more than 4 GB of physical memory.Memory and Address Space LimitsThe following table specifies the limits on memory and address space for supported releases of Windows. Unless otherwise noted, the limits in this table apply to all supported releases.Memory typeLimit on X86Limit in 64-bit WindowsUser-mode virtual address space for each 32-bit process2 GBUp to 3 GB with IMAGE_FILE_LARGE_ADDRESS_AWARE and 4GT2 GB with IMAGE_FILE_LARGE_ADDRESS_AWARE cleared (default)4 GB with IMAGE_FILE_LARGE_ADDRESS_AWARE setUser-mode virtual address space for each 64-bit processNot applicableWith IMAGE_FILE_LARGE_ADDRESS_AWARE set (default): x64: 8 TBIntel Itanium-based systems: 7 TBWindows 8.1 and Windows Server 2012 R2: 128 TB2 GB with IMAGE_FILE_LARGE_ADDRESS_AWARE clearedKernel-mode virtual address space2 GBFrom 1 GB to a maximum of 2 GB with 4GT8 TBWindows 8.1 and Windows Server 2012 R2: 128 TBPaged pool384 GB or system commit limit, whichever is smaller.Windows 8.1 and Windows Server 2012 R2: 15.5 TB or system commit limit, whichever is smaller.Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: Limited by available kernel-mode virtual address space. Starting with Windows Vista with Service Pack 1 (SP1), the paged pool can also be limited by the PagedPoolLimit registry key value.Windows Home Server and Windows Server 2003: 530 MBWindows XP: 490 MB384 GB or system commit limit, whichever is smallerWindows 8.1 and Windows Server 2012 R2: 15.5 TB or system commit limit, whichever is smaller.Windows Server 2008 R2, Windows 7, Windows Server 2008 and Windows Vista: 128 GB or system commit limit, whichever is smallerWindows Server 2003 and Windows XP: Up to 128 GB depending on configuration and RAM.Nonpaged pool75% of RAM or 2 GB, whichever is smaller.Windows 8.1 and Windows Server 2012 R2: RAM or 16 TB, whichever is smaller (address space is limited to 2 x RAM).Windows Vista: Limited only by kernel mode virtual address space and physical memory. Starting with Windows Vista with SP1, the nonpaged pool can also be limited by the NonPagedPoolLimitregistry key value.Windows Home Server, Windows Server 2003 and Windows XP: 256 MB, or 128 MB with 4GT.RAM or 128 GB, whichever is smaller (address space is limited to 2 x RAM)Windows 8.1 and Windows Server 2012 R2: RAM or 16 TB, whichever is smaller (address space is limited to 2 x RAM).Windows Server 2008 R2, Windows 7 and Windows Server 2008: 75% of RAM up to a maximum of 128 GBWindows Vista: 40% of RAM up to a maximum of 128 GB.Windows Server 2003 and Windows XP: Up to 128 GB depending on configuration and RAM.System cache virtual address space (physical size limited only by physical memory)Limited by available kernel-mode virtual address space or the SystemCacheLimit registry key value. Windows 8.1 and Windows Server 2012 R2: 16 TB.Windows Vista: Limited only by kernel mode virtual address space. Starting with Windows Vista with SP1, system cache virtual address space can also be limited by the SystemCacheLimit registry key value.Windows Home Server, Windows Server 2003 and Windows XP: 860 MB with LargeSystemCache registry key set and without 4GT; up to 448 MB with 4GT.Always 1 TB regardless of physical RAMWindows 8.1 and Windows Server 2012 R2: 16 TB.Windows Server 2003 and Windows XP: Up to 1 TB depending on configuration and RAM.Physical Memory Limits: Windows 10The following table specifies the limits on physical memory for Windows 10.VersionLimit on X86Limit on X64Windows 10 Enterprise4 GB2TBWindows 10 Education4 GB2TBWindows 10 Pro4 GB2TBWindows 10 Home4 GB128GBPhysical Memory Limits: Windows Server 2016The following table specifies the limits on physical memory for Windows Server 2016.VersionLimit on X64Windows Server 2016 Datacenter24 TBWindows Server 2016 Standard24 TBPhysical Memory Limits: Windows 8The following table specifies the limits on physical memory for Windows 8.VersionLimit on X86Limit on X64Windows 8 Enterprise4 GB512 GBWindows 8 Professional4 GB512 GBWindows 84 GB128 GBPhysical Memory Limits: Windows Server 2012The following table specifies the limits on physical memory for Windows Server 2012. Windows Server 2012 is available only in X64 **s.VersionLimit on X64Windows Server 2012 Datacenter4 TBWindows Server 2012 Standard4 TBWindows Server 2012 Essentials64 GBWindows Server 2012 Foundation32 GBWindows Storage Server 2012 Workgroup32 GBWindows Storage Server 2012 Standard4 TBHyper-V Server 20124 TBPhysical Memory Limits: Windows 7The following table specifies the limits on physical memory for Windows 7.VersionLimit on X86Limit on X64Windows 7 Ultimate4 GB192 GBWindows 7 Enterprise4 GB192 GBWindows 7 Professional4 GB192 GBWindows 7 Home Premium4 GB16 GBWindows 7 Home Basic4 GB8 GBWindows 7 Starter2 GBN/APhysical Memory Limits: Windows Server 2008 R2The following table specifies the limits on physical memory for Windows Server 2008 R2. Windows Server 2008 R2 is available only in 64-bit **s.VersionLimit on X64Limit on IA64Windows Server 2008 R2 Datacenter2 TBWindows Server 2008 R2 Enterprise2 TBWindows Server 2008 R2 for Itanium-Based Systems2 TBWindows Server 2008 R2 Foundation8 GBWindows Server 2008 R2 Standard32 GBWindows HPC Server 2008 R2128 GBWindows Web Server 2008 R232 GBPhysical Memory Limits: Windows Server 2008The following table specifies the limits on physical memory for Windows Server 2008. Limits greater than 4 GB for 32-bit Windows assume that PAE is enabled.VersionLimit on X86Limit on X64Limit on IA64Windows Server 2008 Datacenter64 GB1 TBWindows Server 2008 Enterprise64 GB1 TBWindows Server 2008 HPC **128 GBWindows Server 2008 Standard4 GB32 GBWindows Server 2008 for Itanium-Based Systems2 TBWindows Small Business Server 20084 GB32 GBWindows Web Server 20084 GB32 GBPhysical Memory Limits: Windows VistaThe following table specifies the limits on physical memory for Windows Vista.VersionLimit on X86Limit on X64Windows Vista Ultimate4 GB128 GBWindows Vista Enterprise4 GB128 GBWindows Vista Business4 GB128 GBWindows Vista Home Premium4 GB16 GBWindows Vista Home Basic4 GB8 GBWindows Vista Starter1 GBPhysical Memory Limits: Windows Home ServerWindows Home Server is available only in a 32-bit **. The physical memory limit is 4 GB.Physical Memory Limits: Windows Server 2003 R2The following table specifies the limits on physical memory for Windows Server 2003 R2. Limits over 4 GB for 32-bit Windows assume that PAE is enabled.VersionLimit on X86Limit on X64Windows Server 2003 R2 Datacenter **64 GB(16 GB with 4GT)1 TBWindows Server 2003 R2 Enterprise **64 GB(16 GB with 4GT)1 TBWindows Server 2003 R2 Standard **4 GB32 GBPhysical Memory Limits: Windows Server 2003 with Service Pack 2 (SP2)The following table specifies the limits on physical memory for Windows Server 2003 with Service Pack 2 (SP2). Limits over 4 GB for 32-bit Windows assume that PAE is enabled.VersionLimit on X86Limit on X64Limit on IA64Windows Server 2003 with Service Pack 2 (SP2), Datacenter **64 GB(16 GB with 4GT)1 TB2 TBWindows Server 2003 with Service Pack 2 (SP2), Enterprise **64 GB(16 GB with 4GT)1 TB2 TBWindows Server 2003 with Service Pack 2 (SP2), Standard **4 GB32 GBPhysical Memory Limits: Windows Server 2003 with Service Pack 1 (SP1)The following table specifies the limits on physical memory for Windows Server 2003 with Service Pack 1 (SP1). Limits over 4 GB for 32-bit Windows assume that PAE is enabled.VersionLimit on X86Limit on X64Limit on IA64Windows Server 2003 with Service Pack 1 (SP1), Datacenter **64 GB(16 GB with 4GT)X64 1 TB1 TBWindows Server 2003 with Service Pack 1 (SP1), Enterprise **64 GB(16 GB with 4GT)X64 1 TB1 TBWindows Server 2003 with Service Pack 1 (SP1), Standard **4 GB32 GBPhysical Memory Limits: Windows Server 2003The following table specifies the limits on physical memory for Windows Server 2003. Limits over 4 GB for 32-bit Windows assume that PAE is enabled.VersionLimit on X86Limit on IA64Windows Server 2003, Datacenter **64 GB(16 GB with 4GT)512 GBWindows Server 2003, Enterprise **64 GB(16 GB with 4GT)512 GBWindows Server 2003, Standard **4 GBWindows Server 2003, Web **2 GBWindows Small Business Server 20034 GBWindows Compute Cluster Server 200332 GBWindows Storage Server 2003, Enterprise **8 GBWindows Storage Server 20034 GBPhysical Memory Limits: Windows XPThe following table specifies the limits on physical memory for Windows XP.VersionLimit on X86Limit on X64Limit on IA64Windows XP4 GB128 GB128 GB (not supported)Windows XP Starter **512 MBN/AN/APhysical Memory Limits: Windows EmbeddedThe following table specifies the limits on physical memory for Windows Embedded.VersionLimit on X86Limit on X64Windows XP Embedded4 GBWindows Embedded Standard 20094 GBWindows Embedded Standard 74 GB192 GBHow graphics cards and other devices affect memory limitsDevices have to map their memory below 4 GB for compatibility with non-PAE-aware Windows releases. Therefore, if the system has 4GB of RAM, some of it is either disabled or is remapped above 4GB by the BIOS. If the memory is remapped, X64 Windows can use this memory. X86 client versions of Windows don’t support physical memory above the 4GB mark, so they can’t access these remapped regions. Any X64 Windows or X86 Server release can.X86 client versions with PAE enabled do have a usable 37-bit (128 GB) physical address space. The limit that these versions impose is the highest permitted physical RAM address, not the size of the IO space. That means PAE-aware drivers can actually use physical space above 4 GB if they want. For example, drivers could map the "lost" memory regions located above 4 GB and expose this memory as a RAM disk.
-
本帖最后由 达康书记 于 2018-1-16 19:12 编辑Windows Server, Version 1709服务器用户将必须使用命令行(特别是PowerShell)与远程用户界面(如熟悉的RSAT),这个给用户带来很大不便,尤其上传共享文件到Windows Server 1709比较麻烦。 结合个人使用经验,提供2个简单方法,仅供参考,希望有所帮助,轻拍,谢谢。 方法1: 1、创建一个带GUI的windows Server服务器,绑定EIP,将需要共享的文件夹设置局域网共享权限。 9068 2、在同一个VPC网络中创建一个Windows Server 1709服务器,通过xcopy进行拷贝即可。 9081 方法2: 1、通过MSTSC设置要共享的硬盘 9070 9071 9072 2、确保Windows Server 1709服务器绑定EIP,调用任务管理器运行一个notepad 9073 9074 3、通过notepad打开MSTSC共享过来的硬盘 9075 9076 4、直接复制想要的文件 9077 9078 5、在你想要的目录下粘贴想要的文件 9079 6、OK,拷贝完毕 9080
-
本帖最后由 达康书记 于 2018-1-16 22:07 编辑早在2017年6月,微软就曾宣布 Windows Server加入半年发布频率,以更快的速度进行创新。微软于Ignite 2017正式推出了Windows Server, version 1709版本,这也恰好是该系统半年度通道的第一个版本,这是开创新模式的首个版本。从今天开始,Windows Server, version 1709虚拟机镜像模板已经正式上线华为云平台。 Ignite 2017:微软发布Windows Server Version 1709 8993 ▲图片来源:Neowin Windows Server将通过两个通道提供,一个是长期服务通道,另一个是半年度服务通道,无论你选择哪个通道,微软表示,你都能够完全控制补丁的安装和部署。 微软在Windows Server 1709中明确关注应用程序与容器开发者群体。新的容器基础镜像包括Server Core与Nano Server; 其中Server Core适用于现有应用的“直接迁移”,而Nano Server则主要面向.Net Core或者Node.js上的新应用构建。Windows Server Version 1709带来了多项改进,包括更新的Server Core容器镜像,用户可尽可能少地将其现有的应用程序转换为容器,此外,服务器的核心容器镜像体积缩小了60%,Nano Server容器镜像的体积缩小了80%,这极大提升了其部署速度。 8994 ▲图:Containers 8995 ▲图:Nano Server Windows Server 1709的本质在于对Windows Server的Server Core变体作出重要更新,其中分别包括标准版(Standard)和数据中心版(Datacenter)两个新版本。新的Windows Server面向DevOps类组织,同时强化了对容器及云部署的支持能力。 不过为了使用新版本,用户将必须使用命令行(特别是PowerShell)与远程用户界面(如熟悉的RSAT),配合基于浏览器的Honolulu项目进行服务器管理。 这一结果其实并不令人意外,毕竟微软一直在向服务器GUI发出警告信号,而新的命令行工具确实在服务器的远程管理方面具有显著优势。事实上,PowerShell与Honolulu的结合使得Windows Server与其各类基于Unix的竞争对手更趋一致。此外,微软也建立起新的管理基准,并以此为基础添加容器支持以及其它服务器操作系统使用方法。 当前,Windows Server Version 1709 Datacenter版在华为云上推出,欢迎大家试用和体验。Microsoft华为云用户现在可以通过华为云公共镜像中的映像部署Windows Server, Version 1709 Datacenter 64bit。 8996 ▲图:命令行登录界面截图 8997 ▲图:系统信息截图
-
新购买的华为云的数据盘默认是没有分区、格式化的,在系统的我的电脑中不会显示,您如何对Windows Server 2012 版本服务器进行分区、格式化? 注意: 磁盘分区和格式化是高风险行为,请慎重操作。本文档描述如何处理一个新买的数据盘,如果您的数据盘上有数据,请务必对数据盘创建快照以避免可能的数据丢失。 云服务器 ECS 仅支持对数据盘进行分区,而不支持对系统盘进行分区。如果您强行使用第三方工具对系统盘进行分区操作,可能引发未知风险,如系统崩溃、数据丢失等。 本文仅适用于不大于 2 TB 的数据盘。 操作须知 单独购买的数据盘需要先挂载数据盘,然后才能进行格式化和分区操作。 随实例时一起购买的数据盘,无需挂载,直接格式化并分区。 操作步骤 1、点击左下角的服务器管理图标 7040 2、点击右上角的“工具”,再选择“计算机管理” 7041 3、再点击“磁盘管理” 7042 4、在磁盘1的按钮处单击右键,选择“联机” 7043 5、联机之后再在磁盘1的按钮处单击右键,选择“初始化磁盘” 7044 6、点击“确定” 7045 7、在未分配的空间处单击右键,选择“新建简单卷” 7046 8、点击“下一步” 7047 9、点击“下一步” 7048 10、点击下一步 7049 11、点击下一步 7050 12、点击完成 7051
-
本帖最后由 达康书记 于 2017-12-19 17:17 编辑新购买的华为云的数据盘默认是没有分区、格式化的,在系统的我的电脑中不会显示,您如何对Windows Server 2008 版本服务器进行分区、格式化? 注意: [*]磁盘分区和格式化是高风险行为,请慎重操作。本文档描述如何处理一个新买的数据盘,如果您的数据盘上有数据,请务必对数据盘创建快照以避免可能的数据丢失。 [*]云服务器 ECS 仅支持对数据盘进行分区,而不支持对系统盘进行分区。如果您强行使用第三方工具对系统盘进行分区操作,可能引发未知风险,如系统崩溃、数据丢失等。 [*]本文仅适用于不大于 2 TB 的数据盘。 操作须知 单独购买的数据盘需要先挂载数据盘,然后才能进行格式化和分区操作。 随实例时一起购买的数据盘,无需挂载,直接格式化并分区。 操作步骤 1、启动左下角任务栏中的服务器管理器,选择存储>磁盘管理。 7033 2、在需要分区的磁盘上(磁盘 1),右键选择联机。 说明: 未格式化分区的数据盘处于脱机状态,需要为其联机。 7034 3、在需要分区的磁盘上(磁盘 1),右键选择新建简单卷。 7035 4、在弹出的新建简单卷向导对话框中,单击下一步。 7036 5、设置简单卷的大小,即分区的大小,单击下一步。 说明:如果您只创建一个主区,使用默认值。 7037 6、选择一个驱动器号(即盘符),如本示例中选择 E。单击下一步。 7038 7、格式化分区,默认勾选了执行快速格式化,单击下一步。 7039 8、单击完成,系统会自动设置好新的分区。
-
本帖最后由 达康书记 于 2017-12-8 17:05 编辑公有云上云windows服务器登陆密码丢失了如何重置呢?公有云上讲求的是安全,安全,安全!大家不可能都像阿里云那样内置一个aliyun-service在虚拟机里完成各种注入,重置和分区等等的事后操作,这个之前一直被大家质疑和诟病,如你住个酒店,屋子里一直有个监控摄像头一样。 云大厂商亚马逊利用Ec2离线卸卷挂卷方式自助完成的,不过这个在华为云上暂时无法借鉴: [code]http://docs.aws.amazon.com/zh_cn/AWSEC2/latest/WindowsGuide/ResettingAdminPassword_EC2Config.html[/code] 云大厂商微软云利用组策略方式离线卸卷挂卷方式自助完成的,这个也可以很好的在华为云上使用,具体参考: [code]https://docs.microsoft.com/en-us/azure/virtual-machines/windows/reset-local-password-without-agent[/code] 笔者结合多年的经验另辟蹊径,给出一个更加牛B更简单的自助方式重置华为云Linux弹性云服务器的密码,抛砖引玉,请轻拍。 1、关闭原云服务器,卸载其系统盘,并将系统盘挂载到临时云服务器。 [*]原弹性云服务器关机,进入详情页,并选择“云硬盘”页签。 说明:原弹性云服务器关机时,请勿执行强制关机操作,否则可能引起重置密码操作失败。 [*]单击系统盘所在行的“卸载”,卸载该系统盘。 [*]展开临时云服务器的详情页,并选择“云硬盘”页签。 [*]单击“挂载磁盘”,在“挂载磁盘”对话框中,选择2中卸载的系统盘,将其挂载到临时云服务器上。 [*]远程登录临时云服务器,并重置密码。 [*]在临时云服务器的“操作”列下,单击“远程登录”。 [*]执行以下命令,查看原云服务器上卸载的系统盘在临时云服务器上根分区位置(根分区在第一分区)。 [code][root@SZV1000153057 ~]# fdisk -l ....... Disk /dev/xvdb: 42.9 GB, 42949672960 bytes, 83886080 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size (minimum/optimal): 512 bytes / 512 bytes Disk label type: dos Disk identifier: 0x000a7cfb Device Boot Start End Blocks Id System /dev/xvdb1 * 2048 75497471 37747712 83 Linux /dev/xvdb2 75497472 83886079 4194304 82 Linux swap / Solaris ......[/code] 2、将上述磁盘的根分区挂载到/mnt目录下进行秘密修改。 [*]挂载磁盘分区 [code][root@SZV1000153057 ~]#mount /dev/xvdb1 /mnt/[/code] [*]使用python对密码:1234qwerP生成一个加密文,随机加盐sha-512单向hash如下 [code][root@SZV1000153057 ~]# python -c "import crypt, getpass;print crypt.crypt('1234qwerP')" $6$TWIuNPv3VartQ1Kh$onI0rkrg7V.Ya.rlrCbBNK0f.LiUk0xQ1anntlUv9TW6/CmncIWxYuKT0hRR0F.MmzC5tYKjNUhPXebyF511W1[/code] [*]将密文改到/mnt/etc/shadow, 修改前如下 [code][root@SZV1000153057 ~]# cat /mnt/etc/shadow | grep root root:$6$MYUPZkL4$/Qs1/7Cqtzn7Fjg5TdescgE9ztQKFZINa6hIzruKGVUE/JSty8/btMzl1H2sEQkd.a5fOU.XyU2HWJWTs/JSE0:17423:0:99999:7:::[/code] 更新修改后如下(第一个和第二个冒号之间): [code][root@SZV1000153057 ~]# cat /etc/shadow | grep root root:$6$TWIuNPv3VartQ1Kh$onI0rkrg7V.Ya.rlrCbBNK0f.LiUk0xQ1anntlUv9TW6/CmncIWxYuKT0hRR0F.MmzC5tYKjNUhPXebyF511W1:17423:0:99999:7:::[/code] [*]卸载挂载分区 [code][root@SZV1000153057 ~]#umount /mnt/[/code] 3、关闭临时云服务器,卸载原云服务器的系统盘,并将其重新挂载回原云服务器后执行重启操作。 [*]临时云服务器关机,并进入详情页,选择“云硬盘”页签。 [*]单击“卸载”,卸载2中临时挂载的数据盘。 [*]展开原Linux云服务器的详情页,选择“云硬盘”页签。 [*]单击“挂载磁盘”,在“挂载磁盘”对话框中,选择2中卸载的数据盘,并设置挂载点为“/dev/sda”。 [*]重启原云服务器。
推荐直播
-
华为云码道Agent集成与鸿蒙实战2026/08/11 周二 19:00-21:00
王一男-华为云码道产品规划专家;李炎-华为云码道产品专家;彭江敏-华为云鸿蒙端云一体化开发专家
本次直播带你解读华为云码道7月份产品新特性、新功能。更有专家演示码道Agent Space × 钉钉机器集成实战,从0到1打通消息通道;码道鸿蒙端云一体化实战,快速搭建员工签到系统。
回顾中 -
华为云开发者AI素养直播课·第三期2026/08/21 周五 16:00-18:00
林华鼎-华为云AI开发者运营负责人;念擎-华为云AI开发者运营案例开发专家
本期直播内容:AI六层能力首次详细解读 + 新一代华为云开发者空间亮相 + 校园案例直播带练
即将直播
热门标签