Quantcast
Channel: Spiceworks Community
Browsing all 10 articles
Browse latest View live

Powershell Scripting Help (Creating a Prompt and Loop)

I'm trying to build a PowerShell script that will tell me uptime by PID, which I can do with the following:PowershellNew-TimeSpan-Start(Get-Process-id#).StartTimewhere # is the PID of the process.I'd...

View Article



Powershell Scripting Help (Creating a Prompt and Loop)

The first part is just adding this.Powershell$process=Read-Host"Enter PID"New-TimeSpan-Start(Get-Process-id$process).StartTime

View Article

Powershell Scripting Help (Creating a Prompt and Loop)

You will probably wanted to put some error catching in so if you input the wrong pid you decipher the error

View Article

Powershell Scripting Help (Creating a Prompt and Loop)

This should get you started:Powershellwhile($true){[int]$PID=Read-Host"Enter the process ID number"New-TimeSpan-Start(Get-Process-id$PID).StartTime}

View Article

Powershell Scripting Help (Creating a Prompt and Loop)

Some examples:PowershellDo{$id=Read-Host-Prompt'Enter Process...

View Article


Powershell Scripting Help (Creating a Prompt and Loop)

cduff wrote:Some examples:PowershellDo{$id=Read-Host-Prompt'Enter Process...

View Article

Powershell Scripting Help (Creating a Prompt and Loop)

Powershellwhile($true){$p=Read-Host-Prompt'Enter PID of process or X to end'if($p-eq'X'){break}$ts=New-TimeSpan-Start(Get-Process-id$p).StartTime"process $p ran for {0} days, {1} hours {2} minutes and...

View Article

Powershell Scripting Help (Creating a Prompt and Loop)

As a little background, we potentially have a memory leak that's either related to process uptime or activity of the users in the program that's running as that process. This will help determine which...

View Article


Powershell Scripting Help (Creating a Prompt and Loop)

Glad you got an answer. When I fired up the ISE to type this in, there were ZERO answers. I hit send and find i'M LAST  in the queue! :-(

View Article


Powershell Scripting Help (Creating a Prompt and Loop)

tfl wrote:Glad you got an answer. When I fired up the ISE to type this in, there were ZERO answers. I hit send and find i'M LAST in the queue! :-(Don't worry! You got a helpful post because I used part...

View Article
Browsing all 10 articles
Browse latest View live




Latest Images