It didn't like the "less than"

$Cache = Get-WmiObject -namespace root\ccm\SoftMgmtAgent -class CacheConfig
$Cache.size < 10000

Error from AppDiscovery.log...

In-line script returned error output: The '<' operator is reserved for future 
use.
At C:\WINDOWS\CCM\SystemTemp\d9f5d2b8-bacb-4c87-a316-be5732098c34.ps1:3 char:14
+ $Cache.size < <<<<  10000
+ CategoryInfo          : ParserError: (<:OperatorToken) [], ParseException
+ FullyQualifiedErrorId : RedirectionNotSupported


Thanks,
Mike

From: [email protected] [mailto:[email protected]] On 
Behalf Of Todd Hemsell
Sent: Wednesday, July 24, 2013 1:58 PM
To: [email protected]
Subject: Re: [mssms] CM2012 Application detection method

do you say NO EQUAL?

if so change it to less than and then query the size.




On Wed, Jul 24, 2013 at 1:41 PM, Mike Gouldthorp 
<[email protected]<mailto:[email protected]>> wrote:
As a means of a detection method Im trying to create a simple Powershell script 
to validate that the client cache is a specific size (10,000 MB)

$Cache = Get-WmiObject -namespace root\ccm\SoftMgmtAgent -class CacheConfig
$Cache.size = 10000

My application will successfully change the client cache size to 10000 MB but 
the deployment fails on the detection method.

The software change returned error code 0x87D00324(-2016410844).

Any thoughts on how I would go about creating a detection method based on the 
cache size being a specific size?

Thanks for the help!

Mike G.






Reply via email to