Quantcast
Channel: The Official Scripting Guys Forum! forum
Viewing all articles
Browse latest Browse all 15028

Display message using If condition is null in Power-shell

$
0
0

Hi All,

         I am getting list of particular product using power-shell.I want to display the info if i didn't get any list of info as "No information  exist with this product".

       I had received snippet of code in power-shell to find office product I want to know weather "$Mylist" is null of not .if null  I would like to show message.Can any one help me how can I do this

$Mylist= gwmi Win32_Product |?{$_.Name -match 'office'}|select name


Thanks, Quality Communication Provides Quality Work. http://siddiq-sharepoint2010.blogspot.in/ Siddiqali Mohammad .


Viewing all articles
Browse latest Browse all 15028

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>