Powershell sccm: ip boundary in variable?

Hi,

How do I set an ip boundary variable in Powershell (what type or other config)?

If I do it like this, I get an error (sccm boundary config):

$Iprange = '192.168.1.100-192.168.1.200'
 New-CMBoundary -type IPRange -Value $iprange -name "My IP range"

Works fine via  New-CMBoundary -type IPRange -Value 192.168.1.100-192.168.1.200' -name "My IP range"


Thanks.
J.
janhoedtAsked:
Who is Participating?
 
oBdACommented:
Works perfectly fine when copied and pasted fresh from your example:
$Iprange = '192.168.1.100-192.168.1.200'
New-CMBoundary -type IPRange -Value $iprange -name "My IP range"

Open in new window

What is the exact error you're getting?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.