Posts

Showing posts from April, 2016

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: http://downloadplugins.citrix.com/Windows/CitrixReceiver.exe 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 # ----------------------------------------------------------------