Showing posts from 2016

PowerShell: Download and Install Java 8 JRE

This script I wrote for our automation system that will: Download the latest Java 8 JRE from Save in a local directory C:\Install Create a Install Options File Run the installer silently with the necessary Installer Options The Installer Options file determines what configuration is used the install of Java. For example, in the script I have configured. This will perform a silent install, auto updates enabled, no reboot after the installation, Sponsors/ads install disabled and will uninstall any older existing installations of Java JRE. INSTALL_SILENT=Enable AUTO_UPDATE=Enable REBOOT=Disable SPONSORS=Disable REMOVEOUTOFDATEJRES=Enable You can find these and other options to use from the Java website: This has been tested to work on PowerShell v2 and higher. --------------------------------------------------------------------------

PowerShell: BATCH Script to Allow PowerShell Scripts to Execute

For some SysAdmins, they will use one or more tools to deploy software to a range of computers on their network. For me, it our monitoring tool that allows are to remote execute scripts to do some sort of task. Writing in PowerShell is amazing and is Microsoft's best yet command line tool. However by default for security purposes, script execuition is blocked for untrusted or unsigned scripts. I won't go into Signing scripts just now but using the following command will allow you to run PowerShell Scripts Set-ExecutionPolicy -RemoteSigned This line still provides a level of protection while still allwoing you to execute custom scripts. Other switches include -bypass and -unrestricted. So how can we get a large number of these set? There are a number of ways: Group Policy Batch Script The reason for me writing this BATCH Script is that it allows me to deploy and run on a computer regardless of the Domain it is joined to. Copy and paste this code into a text

PowerShell: Download and Install Citrix Receiver

I have been doing quite a bit of work lately on PowerShell scripting for work and this is a common one we deploy to our clients that use Citrix. This script does the following: Creates the folder C:\Install\CitrixReceiver Downloads the latest Citrix Receiver software from the Citrix website Installs the downloaded Receiver silently The link for the Citrix Receiver is: Works with PowerShell v2 and higher. A lot of my scripts are built to work at this level as it means that I can deploy my scripts to older machines without having to first upgrade PowerShell. Copy and paste the code into a text file called InstallCitrixReceiver.ps1. # -------------------------------------------------------------------------- # Citrix Receiver Install Script # Date: 14-Mar-2016 # Created by: Daniel Burrowes # ----------------------------------------------------------------