BGinfo Powershell script

Hello Guys, can anyone help me out building a powershell script to install BGinfo but also I need it to show only IP address, host name and that’s it. I created the one below but it gives me an error.

Define the download URL for BGInfo

$bginfoUrl = “

Define the download location

$downloadPath = “C:\Temp\Bginfo.exe”

Download BGInfo

Invoke-WebRequest -Uri $bginfoUrl -OutFile $downloadPath

Define the BGInfo configuration file

$bginfoConfig = @"

Save the configuration to a file

$bginfoConfigPath = “C:\Temp\BginfoConfig.bgi”
$bginfoConfig | Out-File -FilePath $bginfoConfigPath -Encoding ASCII

Install BGInfo with the specified configuration

Start-Process -FilePath $downloadPath -ArgumentList “/SILENT”, “/NOLICPROMPT”, “/TIMER:0”, “/NOSPLASH”, “/ACCEPTLICENSE”, “/LOADCONFIG:$bginfoConfigPath”

Bienvenido / Welcome to the forum. :wave:t3:

before we proceed … When you post code, sample data, console output or error messages please format it as code using the preformatted text button ( </> ). Simply place your cursor on an empty line, click the button and paste your code.

Thanks in advance

How to format code in 1 <---- Click :point_up_2:t4: :wink:

( !! Sometimes the preformatted text button hides behind the settings gear symbol. :wink: )

May I ask some more background info? Is it only for you / one computer or do you want to install it on many computers? If “yes” - are these computers in an enterprise network, maybe in an Active Directory Domain?

What errors? Please - since errors are an important language feature telling you what’s wrong and sometimes even how to fix it - you should share the complete errror message (formatted as code as well please!).

That looks quiet simple if I compare it to the *.bgi files I have seen so far. Have you tried if that’s a sufficient BGInfo config file?

That’s actually not installing it - it’s actually just starting it. If you want to start BGInfo when WIndows starts you have to run this command line with one of the available auto start options in Windows.

1 Like