@echo off echo batch File Test pause Dir %windir%/system
PS C:\PS> ./ping
batch File Test
Press any key to continue . . .
Volume in drive C has no label.
Volume Serial Number is 4E9B-D846
Directory of C:Windowssystem
2009/06/11 05:21 69,584 avicap.dll
2009/06/11 05:21 109,456 avifile.dll
2009/07/14 05:41 32,816 COMMDLG.DLL
2009/07/14 05:41 2,000 keyboard.drv
2009/06/11 05:42 9,936 lzexpand.dll
2009/06/11 05:21 73,376 mciavi.drv
2009/06/11 05:21 25,264 mciseq.drv
2009/06/11 05:21 28,160 mciwave.drv
2009/07/14 05:41 68,992 MMSYSTEM.DLL
2009/07/14 05:41 1,152 mmtask.tsk
2009/07/14 05:41 2,032 mouse.drv
2009/06/11 05:21 126,912 msvideo.dll
2009/06/11 05:42 82,944 olecli.dll
2009/07/14 05:41 24,064 OLESVR.DLL
2009/07/14 05:41 5,120 SHELL.DLL
2009/07/14 05:41 1,744 sound.drv
2009/06/11 05:25 5,532 stdole.tlb
2009/07/14 05:41 3,360 system.drv
2009/07/14 05:41 4,048 TIMER.DRV
2009/06/11 05:42 9,008 ver.dll
2009/07/14 05:41 2,176 vga.drv
2009/07/14 05:41 12,704 WFWNET.DRV
22 File(s) 700,380 bytes
2 Dir(s) 75,927,420,928 bytes free
Set wmi = GetObject("winmgmts:")
Set collection = wmi.ExecQuery("select * from Win32_Process")
For Each process in collection
WScript.Echo process.getObjectText_
Next
PS C:\PS> cscript.exe .test.vbs
Microsoft (R) Windows Script Host Version 5.8
Copyright (C) Microsoft Corporation. All rights reserved.
instance of Win32_Process
{
Caption = "System Idle Process";
CreationClassName = "Win32_Process";
CSCreationClassName = "Win32_ComputerSystem";
CSName = "test-me-01";
Description = "System Idle Process";
Handle = "0";
HandleCount = 0;
KernelModeTime = "484113379271";
Name = "System Idle Process";
OSCreationClassName = "Win32_OperatingSystem";
OSName = "Microsoft Windows 7 Enterprise |C:Windows|DeviceHarddisk0Partition2";
OtherOperationCount = "0";
OtherTransferCount = "0";
PageFaults = 0;
PageFileUsage = 0;
ParentProcessId = 0;
PeakPageFileUsage = 0;
PeakVirtualSize = "0";
PeakWorkingSetSize = 0;
Priority = 0;
PrivatePageCount = "0";
ProcessId = 0;
QuotaNonPagedPoolUsage = 0;
QuotaPagedPoolUsage = 0;
QuotaPeakNonPagedPoolUsage = 0;
QuotaPeakPagedPoolUsage = 0;
ReadOperationCount = "0";
ReadTransferCount = "0";
SessionId = 0;
ThreadCount = 2;
UserModeTime = "0";
VirtualSize = "0";
WindowsVersion = "6.1.7601";
WorkingSetSize = "24576";
WriteOperationCount = "0";
WriteTransferCount = "0";
};
PS C:\PS> echo "dir;Get-PSProvider;help dir" >test.ps1 PS C:\PS> Get-Content ./test.ps1 dir;Get-PSProvider;help dir PS C:\PS> ./test.ps1初次执行脚本时,可能会碰到一个异常: File ” C:\PS\test.ps1″ cannot be loaded because the execution of scripts is disabled on this system. Please see “get-help about_signing” for more details. At line:1 char:10 + .test.ps1 <<<<
The term ‘now' is not recognized as the name of a cmdlet, function, script file, or operable program. Chec g of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:4 + now <<<< + CategoryInfo : ObjectNotFound: (now:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException
机械节能产品生产企业官网模板...
大气智能家居家具装修装饰类企业通用网站模板...
礼品公司网站模板
宽屏简约大气婚纱摄影影楼模板...
蓝白WAP手机综合医院类整站源码(独立后台)...苏ICP备2024110244号-2 苏公网安备32050702011978号 增值电信业务经营许可证编号:苏B2-20251499 | Copyright 2018 - 2025 源码网商城 (www.ymwmall.com) 版权所有