Monthly Archives: April 2015

Setup Powershell Remoting … Remotely

You can use Sysinternals psexec to setup powershell remoting … remotely.

Get psexec.exe from here: 

The command to install it is:

psexec \%PCNAME% -h c:windowssystem32winrm.cmd quickconfig –quiet

Where %PCNAME% is the name of the PC you wish to install it on.

psexec \WA_P_023 –h:windowssystem32winrm.cmd quickconfig -quiet

Using Powershell to log Processor Temperature

I needed to log the temperature of the processor.  I found a Powershell function that could be used, but listed more information than I needed, so I modified it.  The original function can be found here. (new window).  I modified the function to only grab the temperature in Celsius, and added a log to file with Date/Time detail, as well as allow multiple processor sensors to be recorded.
This is also an example of using New-Object and Add-Member
The script can be found on pastebin here. (new window)

Adobe DC Customisation Wizard

A new version of Adobe Reader is out, with a new name.  No longer called Adobe Reader, it is called Acrobat Reader.  And the version is ‘DC’.

So head on over to Adobe’s website, download and install the Customisation wizard:

Grab Acrobat Reader (without the mcafee / google bundle):

Use your favourite program to extract the files from within the .exe file (WinRAR, 7zip, etc).

Once you have the .MSI file extracted, you can then open the customisation wizard, and open the .MSI using the customisation wizard.

Make any relevant changes you wish to the .MSI file.  EG: ‘Supress display of End User License Agreement (EULA)’, ‘Disable product updates’, ‘Disable Upsell’, etc.

You may also want to use the Registry section of the Customisation Wizard to makes changes, or use Group Policy, or alternate methods of setting the relevant keys:

Don’t show messages while viewing a document
HKLMSOFTWAREPoliciesAdobeAcrobat ReaderDCFeatureLockdowncIPM

Show me messages when I launch Adobe Acrobat Reader DC
HKLMSOFTWAREPoliciesAdobeAcrobat ReaderDCFeatureLockdowncIPM

Show welcome dialog when opening file
HKLMSOFTWAREPoliciesAdobeAcrobat ReaderDCFeatureLockdowncWelcomeScreen

HKLMSoftwarePoliciesAdobeAcrobat ReaderDCFeatureLockDown

The ‘bDontShowMsgWhenViewingDoc’ as a value of ‘0’ to NOT display the message.  A value of 1 will display the message.  This is the reverse of what is expected given the name is DontShow.

Save the package in the customisation wizard, and install using the following command:
msiexec.exe /i AcroRead.msi TRANSFORMS=acroread.mst

The details for this post were found: (Some information in this is now incorrect, see the forum post below!)

Ping Monitor in Powershell

I wanted a basic ping monitor that could be used with Powershell, and found the following:
This function can be Dot Sourced, see my article here.
You will need to unblock the script if you downloaded it, see my article here.
You can set the notification to trigger on ping down (-NotifyOnServerDown), ping up (-NotifyOnServerBackOnline), or both (-NotifyAll).
You can set the timeout on the ping using -sleeptimeout
An example usage would be:
start-monitor -computername QLD_CPS_24 -NotifyAll -smtpserver smtp -tonotification -fromnotification
 You can take a list from a file (1 name / ip per line) using the pipeline:
get-content Monitorlist.txt | start-monitor -NotifyAll -smtpserver smtp -tonotification -fromnotification
 When the script is running, it looks like:
The up / down notifications look like: