Hi
I have a variable $variable that can be a site collection in the form (https://intranett) or can be a webapplication in the form ("mywebapplication").
When running the command
get-spwebapplication $variable
it will returnes values even if it a site collection. What i want is that it only returns results if the variable is a webapplication.
Any ideas?
So far i'm at:
#Filter Webapplication, check if it is a webapplication if(Get-spwebapplication $variable -ErrorAction SilentlyContinue) { $UnitSiZeLabeL.text = "This is indeed a Webapplication" }
br
Bjorn