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

unable to write powershell command output to variable

$
0
0

Hi All, i am trying to find if firefox is blocked or not in a system. I have imported module from remy's website http://code.remyservices.net/powershell-firefoxpref/wiki/Home .

Thanks to remy for his invaluable help. I am able to get the output in command. But i am not able to assign the output to a variable. Please help.

Below is the code of the script and the output...

code:

Import-Module 'C:\firefox module\FirefoxPref.psd1'

Import-Module 'C:\firefox module\FirefoxPref.psm1'

Get-Firefoxpref -scope user -file mozilla.cfg -setting network.proxy.type

output in powershell:

Setting found:
    lockPref("network.proxy.type", 2);

I would like to assign the output to a variable.

$var = Get-Firefoxpref -scope user -file mozilla.cfg -setting network.proxy.type
is not working...

$var = powershell .\firefox block proxy.ps1

is also not working..

Please Advice


Viewing all articles
Browse latest Browse all 6937

Latest Images

Trending Articles



Latest Images