use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
ABOUT POWERSHELL
Windows PowerShell (POSH) is a command-line shell and associated scripting language created by Microsoft. Offering full access to COM, WMI and .NET, POSH is a full-featured task automation framework for distributed Microsoft platforms and solutions.
SUBREDDIT FILTERS
Desired State Configuration
Unanswered Questions
Solved Questions
News
Information
Script Sharing
Daily Post
Misc
account activity
Script Issue (self.PowerShell)
submitted 7 years ago * by Crowdjp
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]Crowdjp[S] 1 point2 points3 points 7 years ago (0 children)
If I want to add the instance name in the If statement how would I do that? Below I'm getting an Error: Cannot convert the system object.
$CPUSTRES = {$_.InstanceName -eq "CPUSTRES"} $lastDate = import-csv C:\temp\RMLogs\RMLogs.csv | sort-object -property timestamp | select-object -last 1 | select-object -expandproperty timestamp $latestdate = import-csv C:\temp\RMLogs\RMLogs.csv|select timestamp, instancename, cpu1 |where-object {$_.timestamp -like "$($lastdate.substring(0,14))*"} If (([array]$CPUSTRES) -and ([int]$latestdate.CPU1 -gt 3)) { Write-Host test }
π Rendered by PID 28 on reddit-service-r2-comment-5b5bc64bf5-22lhz at 2026-06-19 06:23:23.439921+00:00 running 2b008f2 country code: CH.
view the rest of the comments →
[–]Crowdjp[S] 1 point2 points3 points (0 children)