Quantcast
Channel: Windows PowerShell forum
Viewing all articles
Browse latest Browse all 21975

Use powershell variable in apostrophe

$
0
0

Hello,

we try to create new management scopes with

New-ManagementScope -Name domain.com -RecipientRestrictionFilter {(CustomAttribute6 -eq 'domain.com')}

If we want to use a variable instead of domain.com

New-ManagementScope -Name $domainname -RecipientRestrictionFilter {(CustomAttribute6 -eq '$domainname')}

The variable in the statement '$domainname' is not expanded.

Does anyone have a clue?

Thanks,

Thomas





Viewing all articles
Browse latest Browse all 21975

Trending Articles



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