PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about...
Transcript of PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about...
![Page 1: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/1.jpg)
PsToolsCopyright©1999-2004MarkRussinovichSysinternals-www.sysinternals.com
TheWindowsNTandWindows2000ResourceKitscomewithanumberofcommandlinetoolsthathelpyouadministeryourWindowsNT/2Ksystems.Overtime,I'vegrownacollectionofsimilartools,includingsomenotincludedintheResourceKits.Whatsetsthesetoolsapartisthattheyallallowyoutomanageremotesystemsaswellasthelocalone.ThefirsttoolinthesuitewasPsList,atoolthatletsyouviewdetailedinformationaboutprocesses,andthesuiteiscontinuallygrowing.The"Ps"prefixinPsListrelatestothefactthatthestandardUNIXprocesslistingcommand-linetoolisnamed"ps",soI'veadoptedthisprefixforallthetoolsinordertotiethemtogetherintoasuiteoftoolsnamedPsTools.
AlloftheutilitiesinthePsToolssuiteworkonWindowsNT,Windows2000,WindowsXP,andServer2003andnoneofthetoolsrequiresanyspecialinstallation.Youdon'tevenneedtoinstallanyclientsoftwareontheremotecomputersatwhichyoutargetthem.Runthembytypingtheirnameandanycommand-lineoptionsyouwant.Toshowcompleteusageinformation,specifythe"-?"command-lineoption.
ThetoolsincludedinthePsToolssuiteare:
PsExec-executeprocessesremotelyPsFile-showsfilesopenedremotelyPsGetSid-displaytheSIDofacomputerorauserPsInfo-listinformationaboutasystemPsKill-killprocessesbynameorprocessIDPsList-listdetailedinformationaboutprocessesPsLoggedOn-seewho'sloggedonlocallyandviaresourcesharingPsLogList-dumpeventlogrecordsPsPasswd-changesaccountpasswordsPsService-viewandcontrolservicesPsShutdown-shutsdownandoptionallyrebootsacomputerPsSuspend-suspendandresumeprocesses
![Page 2: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/2.jpg)
RequirementsSomeofthetoolsrequirethatthedefaultadmin$sharebeavailableand/orthattheRemoteRegistryservicebeactive.
LicenseNopartofPsToolsmayberedistributedinanyway,orbyanymeans,withoutthepriorwrittenpermissionofSysinternalsLLC.IfyouwishtoredistributePsTools,forexampleforusewithinanorganization,[email protected].
![Page 3: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/3.jpg)
PsExec
UtilitieslikeTelnetandremotecontrolprogramslikeSymantec'sPCAnywhereletyouexecuteprogramsonremotesystems,buttheycanbeapaintosetupandrequirethatyouinstallclientsoftwareontheremotesystemsthatyouwishtoaccess.PsExecisalight-weighttelnet-replacementthatletsyouexecuteprocessesonothersystems,completewithfullinteractivityforconsoleapplications,withouthavingtomanuallyinstallclientsoftware.PsExec'smostpowerfulusesincludelaunchinginteractivecommand-promptsonremotesystemsandremote-enablingtoolslikeIpConfigthatotherwisedonothavetheabilitytoshowinformationaboutremotesystems.
InstallationCopyPsExecontoyourexecutablepath.Typing"psexec"displaysitsusagesyntax.
Usageusage:[\\computer[,computer[,...]|@file][-uuser[-ppsswd]][-ns][-s|-e][-i][-c[-f|-v]][-d][-wdirectory][-<priority>][-an,n,...>]cmd[arguments]
computerDirectPsExectoruntheapplicationonthecomputerorcomputersspecified.IfyouomitthecomputernamePsExecrunstheapplicationonthelocalsystemandifyouenteracomputernameof\\*thenPsExecexecutesthecommandsonallcomputersinthecurrentdomain.
@file PsExecwillexecutethecommandoneachofthecomputerslistedinthefile. -u Specifiesoptionalusernameforlogintoremotecomputer.
-p Specifiesoptionalpasswordforusername.Ifyouomitthisyouwillbepromptedtoenterahiddenpassword.
-s RunremoteprocessintheSystemaccount. -e Loadsthespecifiedaccount'sprofile. -i Runtheprogramsothatitinteractswiththedesktopontheremotesystem.
-c Copythespecifiedprogramtotheremotesystemforexecution.Ifyouomitthisoptionthentheapplicationmustbeinthesystem'spathontheremotesystem.
-n Specifiestimeoutinsecondsconnectingtoremotecomputers.
-f Forcethecopyofthespecifiedprogramifitalreadyexistsontheremotesystem.
-v Copythespecifiedfileonlyifithasahigherversionnumberorisneweronthantheoneontheremotesystem.
![Page 4: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/4.jpg)
-d Don'twaitforapplicationtoterminate.Onlyusethisoptionfornon-interactiveapplications.
-w Settheworkingdirectoryoftheprocess(relativetotheremotecomputer).
-priority Specifies-low,-belownormal,-abovenormal,-highor-realtimetoruntheprocessatadifferentpriority.
-aSeparateprocessorsonwhichtheapplicationcanrunwithcommaswhere1isthelowestnumberedCPU.Forexample,toruntheapplicationonCPU2andCPU4,enter:"-a2,4"
arguments Argumentstopass(notethatfilepathsmustbeabsolutepathsonthetargetsystem)
Youcanencloseapplicationsthathavespacesintheirnamewithquotationmarkse.g."psexec\\marklap"c:\longname\app.exe".Putargumentsdirectedattheapplicationoutsideoftheparenthesis.Inputisonlypassedtotheremotesystemwhenyoupresstheenterkey,andtypingCtrl-Cterminatestheremoteprocess.
IfyouomitausernametheremoteprocessrunsinthesameaccountfromwhichyouexecutePsExec,butbecausetheremoteprocessisimpersonatingitwillnothaveaccesstonetworkresourcesontheremotesystem.Whenyouspecifyausernametheremoteprocessexecutesintheaccountspecified,andwillhaveaccesstoanynetworkresourcestheaccounthasaccessto.Notethatthepasswordistransmittedincleartexttotheremotesystem.
ExamplesThefollowingcommandlaunchesaninteractivecommandprompton\\marklap:
psexec\\marklapcmd
ThiscommandexecutesIpConfigontheremotesystemwiththe/allswitch,anddisplaystheresultingoutputlocally:
psexec\\marklapipconfig/all
Thiscommandcopiestheprogramtest.exetotheremotesystemandexecutesitinteractively:
psexec\\marklap-ctest.exe
![Page 5: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/5.jpg)
Specifythefullpathtoaprogramthatisalreadyinstalledonaremotesystemifitsnotonthesystem'spath:
psexec\\marklapc:\bin\test.exe
![Page 6: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/6.jpg)
PsFile
The"netfile"commandshowsyoualistofthefilesthatothercomputershaveopenedonthesystemuponwhichyouexecutethecommand,howeverittruncateslongpathnamesanddoesn'tletyouseethatinformationforremotesystems.PsFileisacommand-lineutilitythatshowsalistoffilesonasystemthatareopenedremotely,anditalsoallowsyoutocloseopenedfileseitherbynameorbyafileidentifier.
InstallationCopyPsFileontoyourexecutablepathandtype"psfile".
UsageThedefaultbehaviorofPsFileistolistthefilesonthelocalsystemthatareopenbyremotesystems.Typingacommandfollowedby"-?"displaysinformationonthesyntaxforthecommand.
usage:psfile[\\RemoteComputer[-uUsername[-pPassword]]][[Id|path][-c]] -u Specifiesoptionalusernameforlogintoremotecomputer.
-p Specifiesoptionalpasswordforusername.Ifyouomitthisyouwillbepromptedtoenterahiddenpassword.
Id Identifier(asassignedbyPsFile)ofthefileforwhichtodisplayinformationortoclose.
Path Fullorpartialpathoffilestomatchforinformationdisplayorclose. -c ClosesthefilesidentifedbyIDorpath.
![Page 7: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/7.jpg)
PsGetSid
HaveyouperformedarolloutandonlytodiscoverthatyournetworkmightsufferfromtheSIDduplicationproblem?InordertoknowwhichsystemshavetobeassignedanewSID(usingaSIDupdaterlikeSysinternals'ownNewSID)youhavetoknowwhatacomputer'smachineSIDis.Upuntilnowthere'sbeennowaytotellthemachineSIDwithoutknowingRegedittricksandexactlywheretolookintheRegistry.PsGetSidmakesreadingacomputer'sSIDeasy,andworksacrossthenetworksothatyoucanquerySIDsremotely.PsGetSidalsoletsyouseetheSIDsofuseraccounts.
InstallationCopyPsPsGetSidontoyourexecutablepathandtype"psgetsid".
UsageUsage:psgetsid[\\computer[,computer[,...]|@file[-uusername[-ppassword]]][account]Ifyouwanttoseeacomputer'sSIDjustpassthecomputer'snameasacommand-lineargument.Ifyouwanttoseeauser'sSID,nametheaccount(e.g."administrator")onthecommand-lineandanoptionalcomputername.
Specifyausernameiftheaccountyouarerunningfromdoesn'thaveadministrativeprivilegesonthecomputeryouwanttoquery.Ifyoudon'tspecifyapasswordasanoptionPsGetSidwillpromptyouforonesothatyoucantypeitinwithouthavingitechoedtothedisplay.
![Page 8: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/8.jpg)
PsInfo
PsInfoisacommand-linetoolthatgatherskeyinformationaboutthelocalorremotesystem,includingthetypeofinstallation,kernelbuild,registeredorganizationandowner,numberofprocessorsandtheirtype,memorysize,theinstalldateofthesystem,andifit'satrialversion,theexpirationdate.PsInfocommand-lineswitchesalsoletyouviewinstalledhotfixesandsoftwareapplications.
InstallationCopyPsInfoontoyourexecutablepathandtypepsinfo.
UsageBydefaultPsInfoshowsinformationforthelocalsystem.Specifyaremotecomputernametoobtaininformationfromtheremotesystem.SincePsInforeliesonremoteRegistryaccesstoobtainitsdata,theremotesystemmustberunningtheRemoteRegistryserviceandtheaccountfromwhichyourunPsInfomusthaveaccesstotheHKLM\SystemportionoftheremoteRegistry.
InordertoaidinautomatedServicePackupdates,PsInforeturnsasavaluetheServicePacknumberofsystem(e.g.0fornoservicepack,1forSP1,etc).
usage:psinfo[\\computer[,computer[,...]|@file[-uusername[-ppassword]]][-h][-s][-d][-c[-tdelimter]]
computerRunthecommandonthecomputerorcomputersspecified.Ifyouomitthecomputernamethecommandrunsonthelocalsystemandifyouenteracomputernameof\\*thenthecommandrunsonallcomputersinthecurrentdomain.
@file Executethecommandoneachofthecomputerslistedinthefile. -u Specifiesoptionalusernameforlogintoremotecomputer.
-p Specifiesoptionalpasswordforusername.Ifyouomitthisyouwillbepromptedtoenterahiddenpassword.
-h Showsinstalledhotfixes. -s Showsinstalledsoftware. -d Showdiskvolumeinformation.
-c DumpinCSVformat.
![Page 9: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/9.jpg)
-t Thedefaultdelimiterforthe-soptionisacomma,butcanbeoverridenwiththe
specifiedcharacter.
![Page 10: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/10.jpg)
PsKill
WindowsNT/2000doesnotcomewithacommand-line'kill'utility.YoucangetoneintheWindowsNTorWin2KResourceKit,butthekit'sutilitycanonlyterminateprocessesonthelocalcomputer.PsKillisakillutilitythatnotonlydoeswhattheResourceKit'sversiondoes,butcanalsokillprocessesonremotesystems.Youdon'tevenhavetoinstallaclientonthetargetcomputertousePsKilltoterminatearemoteprocess.
InstallationCopyPsKillontoyourexecutablepathandtypepskillwithcommand-lineoptionsdefinedbelow.
UsageRunningPsKillwithaprocessIDdirectsittokilltheprocessofthatIDonthelocalcomputer.IfyouspecifyaprocessnamePsKillwillkillallprocessesthathavethatname.
usage:pskill[-t][\\computer[-uusername][-ppassword]]<processname|processid> -t Killtheprocessanditsdescendants. -u Specifiesoptionalusernameforlogintoremotecomputer.
-p Specifiesoptionalpasswordforusername.Ifyouomitthisyouwillbepromptedtoenterahiddenpassword.
processid SpecifiestheprocessIDoftheprocessyouwanttokill.
processname Specifiestheprocessnameoftheprocessorprocessesyouwanttokill.
![Page 11: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/11.jpg)
PsList
MostUNIXoperatingsystemsshipwithacommand-linetoolcalled"ps"(orsomethingequivalent)thatadministratorsusetoviewdetailedinformationaboutprocessCPUandmemoryusage.WindowsNT/2Kcomeswithnosuchtoolnatively,butyoucanobtainsimilartoolswiththeWindowsNTWorkstationorServerResourceKits.ThetoolsintheResourceKits,pstatandpmon,showyoudifferenttypesofinformation,andwillonlydisplaydataregardingtheprocessesonthesystemonwhichyourunthetools.
PsListisutilitythatshowsyouacombinationoftheinformationobtainableindividuallywithpmonandpstat.YoucanviewprocessCPUandmemoryinformation,orthreadstatistics.WhatmakesPsListmorepowerfulthantheResourceKittoolsisthatyoucanviewprocessandthreadstatisticsonaremotecomputer.
InstallationCopyPsListontoyourexecutablepathandtype"pslist".
UsageThedefaultbehaviorofPsLististoshowCPU-orientedinformationforalltheprocessesthatarecurrentlyrunningonthelocalsystem.Theinformationlistedforeachprocessincludesthetimetheprocesshasexecuted,theamountoftimetheprocesshasexecutedinkernelandusermodes,andtheamountofphysicalmemorythattheOShasassignedtheprocess.Command-lineswitchesallowyoutoviewmemory-orientedprocessinformation,threadstatistics,orallthreetypesofdata.
usage:pslist[-?][-d][-m][-x][-t][-s[n][-rn][\\computer[-uusername][-ppassword]][[-e]name|pid] -d ThisswitchhasPsListshowstatisticsforallactivethreadsonthesystem,
groupingthreadswiththeirowningprocess.
-m ThisswitchhasPsListshowmemory-orientedinformationforeachprocess,ratherthanthedefaultofCPU-orientedinformation.
-x WiththisswitchPsListshowsCPU,memoryandthreadinformationforeachof
![Page 12: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/12.jpg)
theprocessesspecified. -t Showprocesstree.
-s[n] Runintask-managermode,foroptionalsecondsspecified.PressEscapetoabort.
-rn Task-managermoderefreshrateinseconds(defaultis1). -u Specifiesoptionalusernameforlogintoremotecomputer.
-p Specifiesoptionalpasswordforusername.Ifyouomitthisyouwillbepromptedtoenterahiddenpassword.
name
Insteadoflistingalltherunningprocessesinthesystem,thisparameternarrowsPsList'sscantothoseprocessesthatbeginwiththenameprocess.Thus:
pslistexp
wouldstatisticsforalltheprocessesthatstartwith"exp",whichwouldincludeExplorer.
-e Usethe-eswitchifyouwanttheprocessnametobetreatedasanexactmatchinsteadofapartialmatch.
pid
Insteadoflistingalltherunningprocessesinthesystem,thisparameternarrowsPsList'sscantotheprocessthathasthespecifiedPID.Thus:
pslist53
woulddumpstatisticsfortheprocesswiththePID53.
![Page 13: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/13.jpg)
PsLoggedOn
Youcandeterminewhoisusingresourcesonyourlocalcomputerwiththe"net"command("netsession"),however,thereisnobuilt-inwaytodeterminewhoisusingtheresourcesofaremotecomputer.Inaddition,NTcomeswithnotoolstoseewhoisloggedontoacomputer,eitherlocallyorremotely.PsLoggedOnisanappletthatdisplaysboththelocallyloggedonusersandusersloggedonviaresourcesforeitherthelocalcomputer,oraremoteone.Ifyouspecifyausernameinsteadofacomputer,PsLoggedOnsearchesthecomputersinthenetworkneighborhoodandtellsyouiftheuseriscurrentlyloggedon.
PsLoggedOn'sdefinitionofalocallyloggedonuserisonethathastheirprofileloadedintotheRegistry,soPsLoggedOndetermineswhoisloggedonbyscanningthekeysundertheHKEY_USERSkey.ForeachkeythathasanamethatisauserSID(securityIdentifier),PsLoggedOnlooksupthecorrespondingusernameanddisplaysit.Todeterminewhoisloggedontoacomputerviaresourceshares,PsLoggedOnusestheNetSessionEnumAPI.NotethatPsLoggedOnwillshowyouasloggedonviaresourcesharetoremotecomputersthatyouquerybecausealogonisrequiredforPsLoggedOntoaccesstheRegistryofaremotesystem.
InstallationCopyPsLoggedOnontoyourexecutablepathandtype"psloggedon".
Usageusage:psloggedon[-?][-l][-x][\\computername|username] -l Showsonlylocallogonsinsteadofbothlocalandnetworkresourcelogons. -x Don'tshowlogontimes. \\computername Specifiesthenameofthecomputerforwhichtolistlogoninformation.
usernameIfyouspecifyausernamePsLoggedOnsearchesthenetworkforcomputerstowhichthatuserisloggedon.Thisisusefulifyouwanttoensurethataparticularuserisnotloggedonwhenyouareabouttochangetheiruserprofileconfiguration.
![Page 14: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/14.jpg)
PsLogList
TheResourceKitcomeswithautility,elogdump,thatletsyoudumpthecontentsofanEventLogonthelocaloraremotecomputer.PsLogListisacloneofelogdumpexceptthatPsLogListletsyoulogintoremotesystemsinsituationsyourcurrentsetofsecuritycredentialswouldnotpermitaccesstotheEventLog,andPsLogListretrievesmessagestringsfromthecomputeronwhichtheeventlogyouviewresides.
InstallationCopyPsLogListontoyourexecutablepathandtype"psloglist".
UsageThedefaultbehaviorofPsLogLististoshowthecontentsoftheSystemEventLogonthelocalcomputer,withvisually-friendlyformattingofEventLogrecords.Commandlineoptionsletyouviewlogsondifferentcomputers,useadifferentaccounttoviewalog,ortohavetheoutputformattedinastring-searchfriendlyway.
usage:psloglist[-?][\\computer[,computer[,...]|@file[-uusername[-ppassword]]][-s[-tdelimiter]][-m#|-n#|-h#|-d#|-w][-c][-x][-r][-amm/dd/yy][-bmm/dd/yy][-ffilter][-iID[,ID[,...]|-eID[,ID[,...]]][-oeventsource[,eventsource][,..]]][-qeventsource[,eventsource][,..]]][-leventlogfile]<eventlog> @file Executethecommandoneachofthecomputerslistedinthefile. -a Dumprecordstimestampedafterspecifieddate. -b Dumprecordstimestampedbeforespecifieddate. -c Cleartheeventlogafterdisplaying. -d Onlydisplayrecordsfrompreviousndays. -e ExcludeeventswiththespecifiedIDorIDs(upto10). -f Filtereventtypeswithfilterstring(e.g."-fw"tofilterwarnings). -h Onlydisplayrecordsfrompreviousnhours. -i ShowonlyeventswiththespecifiedIDorIDs(upto10). -l Dumprecordsfromthespecifiedeventlogfile. -m Onlydisplayrecordsfrompreviousnminutes. -n Onlydisplaythenumberofmostrecententriesspecified. -o Showonlyrecordsfromthespecifiedeventsource(e.g.\"-ocdrom\").
-p Specifiesoptionalpasswordforusername.Ifyouomitthisyouwillbepromptedtoenterahiddenpassword.
![Page 15: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/15.jpg)
-q Omitrecordsfromthespecifiedeventsourceorsources(e.g.\"-ocdrom\"). -r Dumplogfromleastrecenttomostrecent.
-s
ThisswitchhasPsLogListprintEventLogrecordsone-per-line,withcommadelimitedfields.Thisformatisconvenientfortextsearches,e.g.psloglist|findstr/itext,andforimportingtheoutputintoaspreadsheet.
-t Thedefaultdelimeterisacomma,butcanbeoverridenwiththespecifiedcharacter. -u Specifiesoptionalusernameforlogintoremotecomputer. -w Waitfornewevents,dumpingthemastheygenerate. -x Dumpextendeddata.
eventlogBydefaultPsLogListshowsthecontentsoftheSystemEventLog.Specifyadifferenteventlogbytypinginthefirstfewlettersofthelogname,application,system,orsecurity.
![Page 16: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/16.jpg)
PsPasswd
Systemsadministratorsthatmanagelocaladministrativeaccountsonmultiplecomputersregularlyneedtochangetheaccountpasswordaspartofstandardsecuritypractices.PsPasswdisatoolthatletsyouchangeanaccountpasswordonthelocalorremotesystems,enablingadministratorstocreatebatchfilesthatrunPsPasswdagainstthecomputer'stheymanageinordertoperformamasschangeoftheadministratorpassword.
InstallationCopyPsPasswdontoyourexecutablepathandtypepspasswdwithcommand-lineoptionsdefinedbelow.
UsageYoucanusePsPasswdtochangethepasswordofalocalordomainaccountonthelocaloraremotecomputer.
usage:pspasswd[\\computer[,computer[,...]|@file[-uusername[-ppassword]]]Username[NewPassword]]
computerRunthecommandonthecomputerorcomputersspecified.Ifyouomitthecomputernamethecommandrunsonthelocalsystemandifyouenteracomputernameof\\*thenthecommandrunsonallcomputersinthecurrentdomain.
@file Executethecommandoneachofthecomputerslistedinthefile. -u Specifiesoptionalusernameforlogintoremotecomputer.
-p Specifiesoptionalpasswordforusername.Ifyouomitthisyouwillbepromptedtoenterahiddenpassword.
Username Specifiesnameofaccountforpasswordchange. NewPassword Newpassword.IfommittedaNULLpasswordisapplied.
![Page 17: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/17.jpg)
PsService
PsServiceisaserviceviewerandcontrollerforWindowsNT/2K.LiketheSCutilitythat'sincludedintheWindowsNTandWindows2000ResourceKits,PsServicedisplaysthestatus,configuration,anddependenciesofaservice,andallowsyoutostart,stop,pause,resumeandrestartthem.UnliketheSCutility,PsServiceenablesyoutologontoaremotesystemusingadifferentaccount,forcaseswhentheaccountfromwhichyourunitdoesn'thaverequiredpermissionsontheremotesystem.PsServiceincludesauniqueservice-searchcapability,whichidentifiesactiveinstancesofaserviceonyournetwork.YouwouldusethesearchfeatureifyouwantedtolocatesystemsrunningDHCPservers,forinstance.
Finally,PsServiceworksonbothNT4andWindows2000,whereastheWindows2000ResourceKitversionofSCrequiresWindows2000,andPsServicedoesn'trequireyoutomanuallyentera"resumeindex"inordertoobtainacompletelistingofserviceinformation.
InstallationCopyPsServiceontoyourexecutablepathandtype"psservice".
UsageThedefaultbehaviorofPsServiceistodisplaytheconfiguredservices(bothrunningandstopped)onthelocalsystem.Enteringacommandonthecommand-lineinvokesaparticularfeature,andsomecommandsacceptoptions.Typingacommandfollowedby"-?"displaysinformationonthesyntaxforthecommand.
usage:psservice[\\computer[-uusername][-ppassword]]<command><options> -u Specifiesoptionalusernameforlogintoremotecomputer.
-p Specifiesoptionalpasswordforusername.Ifyouomitthisyouwillbepromptedtoenterahiddenpassword.
query Displaysthestatusofaservice config Displaystheconfigurationofaservice setconfig Specifythestarttype(auto,demand,disabled)ofaservice.
![Page 18: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/18.jpg)
start Startsaservice stop Stopsaservice restart Stopsandthenrestartsaservice pause Pausesaservice cont Resumesapausedservice depend Liststheservicesdependentontheonespecified find Searchesthenetworkforthespecifiedservice
![Page 19: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/19.jpg)
PsShutdown
PsShutdownisasimilartotheResourceKitandWindowsXPshutdowntools,providingyouthesameoptionsandabilitytoshutdown,andoptionallyreboot,localandremoteWindowsNT/2K/XP/2003systems.Italsoprovidedadditionaloptionsthatmakeitmorepowerfulandflexible.
InstallationCopyPsShutdownontoyourexecutablepathandtype"psshutdown"withcommand-lineoptionsdefinedbelow.
UsageYoucanusePsShutdowntoinitiateashutdownofthelocaloraremotecomputer,abortanimminentshutdown,logoffaconsoleuser,orlockthedesktop.
usage:psshutdown[\\computer[,computer[,...]|@file[-uusername[-ppassword]]]-s|-r|-h|-d|-k|-a|-l|-o[-f][-c][-ns][-tnn|h:m][-e[u|p]:xx:yy][-m"message"]
computerRunthecommandonthecomputerorcomputersspecified.Ifyouomitthecomputernamethecommandrunsonthelocalsystemandifyouenteracomputernameof\\*thenthecommandrunsonallcomputersinthecurrentdomain.
@file Executethecommandoneachofthecomputerslistedinthefile. -u Specifiesoptionalusernameforlogintoremotecomputer
-p Specifiesoptionalpasswordforusername.Ifyouomitthisyouwillbepromptedtoenterahiddenpassword.
-a Abortsashutdown(onlypossiblewhileacountdownisinprogress) -c Allowtheshutdowntobeabortedbytheinteractiveuser
-eShutdownreasoncode.Specify'u'foruserreasoncodesand'p'forplannedshutdownreasoncodes.xxisthemajorreasoncode(mustbelessthan256)yyistheminorreasoncode(mustbelessthan65536)
-f Forcesallrunningapplicationstoexitduringtheshutdowninsteadofgivingthemachancetogracefullysavetheirdata
-h Hibernatethecomputer -k Poweroffthecomputer(rebootifpoweroffisnotsupported -l Lockthecomputer
-m Thisoptionletsyouspecifyamessagetodisplaytologged-onuserswhenashutdowncountdowncommences
-n Specifiestimeoutinsecondsconnectingtoremotecomputers -o Logofftheconsoleuser
![Page 20: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/20.jpg)
-r Rebootaftershutdown -s Shutdownwithoutpoweroff
-t Specifiesthecountdowninsecondsuntiltheshutdown(default:20seconds)orthetimeofshutdownin24hournotation
-vDisplaymessageforthespecifiednumberofsecondsbeforetheshutdown.Ifyouomitthisparametertheshutdownnotificationdialogdisplaysandspecifyingavalueof0omitsthedialog.
![Page 21: PsTools - documentation.help · PsInfo is a command-line tool that gathers key information about the local or remote system, including the type of installation ... @file Execute the](https://reader034.fdocuments.in/reader034/viewer/2022042207/5ea94e721b6651777d5558ed/html5/thumbnails/21.jpg)
PsSuspend
PsSuspendletsyoususpendprocessesonthelocaloraremotesystem,whichisdesirableincaseswhereaprocessisconsumingaresource(e.g.network,CPUordisk)thatyouwanttoallowdifferentprocessestouse.Ratherthankilltheprocessthat'sconsumingtheresource,suspendingpermitsyoutoletitcontinueoperationatsomelaterpointintime.
InstallationCopyPsSuspendontoyourexecutablepathandtype"pssuspend"withcommand-lineoptionsdefinedbelow.
UsageRunningPsSuspendwithaprocessIDdirectsittosuspendtheprocessofthatIDonthelocalcomputer.IfyouspecifyaprocessnamePsSuspendwillsuspendallprocessesthathavethatname.Specifythe-rswitchtoresumesuspendedprocesses.usage:pssuspend[-r][\\computer[-uusername][-ppassword]]<processname|processid> -r Resumessuspendedprocesses. -u Specifiesoptionalusernameforlogintoremotecomputer.
-p Specifiesoptionalpasswordforusername.Ifyouomitthisyouwillbepromptedtoenterahiddenpassword.
processid SpecifiestheprocessIDoftheprocessyouwanttosuspend.
processname Specifiestheprocessnameoftheprocessorprocessesyouwanttosuspend.