《操作系统安全:PoweiShell命令的实验习题.docx》由会员分享,可在线阅读,更多相关《操作系统安全:PoweiShell命令的实验习题.docx(7页珍藏版)》请在taowenge.com淘文阁网|工程机械CAD图纸|机械工程制图|CAD装配图下载|SolidWorks_CaTia_CAD_UG_PROE_设计图分享下载上搜索。
1、实验一:PowerShell命令的实验习题一、实验目的:1、了解 powershell 命令2、使用并掌握power shell命令二、实验步骤及内容:任务一:查看PowerShell当前环境下可执行的策略;答:第一步,使用win + r翻开运行输入powershell翻开日翊X司 Windows将根据你所域入的名称,为你翻开相应的程序、 文件夹、文档或Internet资源.第二步,在命令界面中输入Get-ExecutionPolicy查看当前可执行的策略ES Windows PowerShell.indows PowerShol1版权斯宥(C) 2016 Microsoft Corporat
2、ion。保存所有权利.PS C:UsersAdmini strator Get-Executi onPoli cy RestrictedPS C:Us9rsAdministrator显示为Restricted ,当前为脚本不能运行。任务二:使用内存找到十个进程;答:第一步,使用win + r翻开运行输入powershell翻开小跖x同 Windows将根据你所臧入的名称,为你翻开相应的程序、 文件夹、文档或Internet资源。确定就肖浏览.第二步,在命令界面中输入ps | sort - ws | select -1st 10查看内存所执行的进程HandlesNPM(K)PM(K)VS(K)C
3、PU(s)IdSIProcessName619378130491724920svchost7925445732933523.8138081SearchUI138730514640899680323. 4223841wps87513642376810400881. 5333241ChsIME270223396584151756272. 3027361explorer905128152196152668228. 8451601360se185613896480153644487. 5360721360se1793349126052195516272. 9158601QQ46353141684195
4、540183. 3969601360se4272636968421252229. 899721virware-vmxPS C:UsersAdministrator)ps | sort - ws | select _1st 10PS C:UsersAdministrator任务三:查看当前登录计算机用户的用户名答:第一步,使用win + r翻开运行输入powershell翻开日翊X司 Windows将根据你所域入的名称,为你翻开相应的程序、 文件夹、文档或Internet资源.第二步,在命令界面中输入 Get-WmiObject -Class Win32_ComputerSystem-Prope
5、rty UserName -ComputerName .查看PS C:UsersAdmini str a tor Get-Wmi Object 1V i n32jConuter Sys tem Prcp、ty UserName Care i-prFhmp .-GENUS_CLASS -SUPERCLASS _DYNASTY _RELPATHPROPERTY jCOUNT-DERIVATIONSERVER _NAHESPACEFA7H2Win32_ComputerSystem10除r吵uZBJR0ACK0VG7KULAdministratorpS C: J二二tia-nr .当前用户的用户名为a
6、dministrator,属于管理员组任务四:查看当前计算机所安装的应用名字。答:第一步,使用win + r翻开运行输入powershell翻开白跖X)司 Windows将根据你所臧入的名称,为你翻开相应的程序、 文件夹、文档或Internet资源。第二步,在命令界面中输入 Get-WmiObject -Class Win32_Product-ComputerName . | Format-Wide -Column 1 查看C:UsersAdministrator Get-WmiObject 71 ass in32_Product ComputmrNam . | Format-Vide Col
7、um 1Python 3.7.0 Development Libraries (32-bit)Fy*hui. 3.7.0 Test Suite(32-bit)Python 3. 7. 0 Executables (32-bit)Python 3. 7.0 Core Interpreter (32-bit)Python 3.7.0 pip Bootstrap (32-bit)Python 3. 7. 0 Tcl/Tk Support (32-bit)Python 3. 7. 0 Standard Library (32-bit)Python 3. 7. 0 Utility Scripts (32
8、-bit)Python 3. 7.0 Documentation (32-bit)Python 3.7.0 Add to Path (32-bit) Microsoft Office Excel ViewerPython 3.7.0 Development Libraries (32-bit)Fy*hui. 3.7.0 Test Suite(32-bit)Python 3. 7. 0 Executables (32-bit)Python 3. 7.0 Core Interpreter (32-bit)Python 3.7.0 pip Bootstrap (32-bit)Python 3. 7.
9、 0 Tcl/Tk Support (32-bit)Python 3. 7. 0 Standard Library (32-bit)Python 3. 7. 0 Utility Scripts (32-bit)Python 3. 7.0 Documentation (32-bit)Python 3.7.0 Add to Path (32-bit) Microsoft Office Excel ViewermicrosoitVisual C+* 2010 x64 Redistributable - 10. 0. 40219Microsoft Visual C+* 2005 Redistribut
10、able (x64)Microsoft Visual C+* 2013 x86 Rinirruni Runtime - 12.0. 40664Jlicrosoft Visual C+* 2010 x86 Redistributable - 10. 0. 40219Microsoft Visual 2015 x86 Additional Runtime - 14. 0. 24516Microsoft Visual C+ 2015 x86 Minicwn Runtine - 14. 0. 24516VMware WorkstationJlicrosoft Visual C* 2013 x64 Hi
11、nirrum Runtime - 12. 0. 40664Oracle VM VirtualBox 5. 2.22Microsoft Visual C+ 2008 Redistributable - x64 9. 0. 30729. 7523Microsoft Visual C+* 2008 Redistributable - x86 9.0.30729. 7523Jlicrosoft Visual Python Launcher 媵由二Microsoft Visual Jlicrosoft Visual Jlicrosoft Visual Microsoft Visual Microsoft
12、 Visual Jlicrosoft Visual Jlicrosoft Visual Microsoft VisualCi 2012 x64 Additional Runtime -C+* 2013 x64 Additional Runtime - 12.0. 40664 C+ 2012 x86 Additional Runtime - 11.0.61135 (7 2005 Redistributable( 2015 x64 Additional Runtime - 14. 0. 24516C+* 2012 x64 Hinicoun Runtine - 11. 0. 61135C+* 201
13、3 x86 Additional Runtime - 12.0. 40664C* 2012 x86 Kinitaun Runtime - 11. 0. 61135 ( 2015 x64 HiniEwn Runtine - 14. 0. 24516任务五:找到当前计算机上使用DHCP启用的网络卡答:第一步,使用win + r翻开运行输入powershell翻开日翊X司 Windows将根据你所域入的名称,为你翻开相应的程序、 文件夹、文档或Internet资源.第二步,在命令界面中输入Get-WmiObject -ClassWin32_NetworkAdapterConfiguration -F
14、ilter DHCPEnabled=true-ComputerName .查看PS C : UsersAdmini strator Get -VzriiOb nectVin32 NetworkAdanterConf iimrationDHCPEnabledTrueIPAddressDefaultIPGatewayDNSDotnainServicoNanokdnicDescriptionMicrosoft Kernel Debug Network AdapterIndex0DHCPEnabledTrueIPAddress(192.168.1.83. fe80: 5499:bcbO: af 1 f
15、 : 9127)DefaultIPGateway(192.168.1.254)DNSDomainfjzbsoft. comServiceNamert640x64DescriptionRealtek PCIe GbE Family ControllerIndex1DHCPEnabledTrueIPAddressDefaultlPGatevrayDNSDomainServiceNaroeRuiJieSSLVPNvJIacServiceX64DescriptionRuijie SSLVPN虚拟网卡Index12DHCPEnabledTrueIPAddress(169.254.212. 88, fe8
16、0::c55f:e723:77d:d458DefaultIPGatewayDNSDomainServiceNameVBoxNetAdpDescriptionVirtxialBox Host-Only Ethernet AdapterIndex14DHCPEnabledTrueIPAddress(192.168.135.1, fe80:c456:303c:5f36:3d89DefaultIPGatewayDNSDomainServiceNaroeVJInet AdapterDescriptionVMware Virtual Ethernet Adapter for VMnetlIndex15DHCPEnabledTrueIPAddress(192.168.172.1, fe80::b8af:2a07:8261:d36dDefaultIPGatewayDNSDomainServiceNameVMnetAdapterB Windows PowerShellX