Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

variable self referance

$
0
0

Hello everyone,

I am trying to figure out why and when I would need to use variable self reference. Can't seem to find anything in google and hoping someone could explain it to or point me to really good article on line that would make it clear.

 

Currently I am breaking apart a piece of code and its using a self reference variable

Get-WmiObject Win32_TcpIpPrinterPort -Filter "name = '$($Printer.Portname)'" -ComputerName $Printserver

I see that if i restructure the ' and ", its not giving me the expected result unless it is a self reference and i really need to know why that is so and in what other cases I may need to use self reference

 

thank you! 

 

 

 


Viewing all articles
Browse latest Browse all 6937

Trending Articles