Powershell Script for System and Services Health Check of Remote servers

Hello all ! Hope you are searching for a script to do general System health check of Remote servers.

As an IT administrator, we would be interested in the below checks always

  • Server status (online/offline)
  • IP Address/RAM info
  • Uptime
  • CPU/Memory usage
  • Local Drives utilization
  • Critical services status

I have started creating a small script initially to do just services status check alone. After months of enhancements in this scripts, now I have a single script which do all these checks and email us the report in a single HTML file. The script reports even if there is any Access related issues while checking the remote servers status

All you have to do is just give the Servers list and the Services list that needs to be checked. Boom !! Thats it.. just get the status right at your inbox within few minutes.

Note – Modify the Email parameters according to your environment. Recipients email addresses should be listed in emails.txt

Script link – https://drive.google.com/open?id=1-QsThOwgWGlf1Rb5QPJPbUkPAist3UQt

ENABLING PASSTHROUGH WITH CITRIX STOREFRONT AND XENAPP SERVICES URL

In Citrix Storefront, Enabling Domain Pass-Through Authentication Methods in the Authentication Node and on the Receiver for Web site does not change the default authentication method for XenApp Services URL.

Also only one authentication method can be configured for each XenApp Services URL and the default authentication method is Explicit (Prompt for user name and password).

Passthrough Authentication Enabled on Receiver for WebPassthrough Authentication Node StoreFront

To configure SSON as the default authentication method for your XenApp Services URL you first need to find the Microsoft IIS Site ID.

Open Command prompt on your StoreFront Server.

Type appcmd list site.

The ID should be returned for the IIS Site as seen below.

List Sites Command Line

Next you will want to make sure all the StoreFront management consoles are closed and then open PowerShell.

The command line you will run is the following-

& "installationlocation\Scripts\EnablePnaForStore.ps1" –SiteId iisid 
  –ResourcesVirtualPath storepath –LogonMethod sson

Enable PNAgent SSON PowerShell Command Line

After the powershell script has run successfully, you will need to propagate the settings to your other StoreFront Servers if you have more than one.

Close your Powershell window and then open StoreFront management console and click Propagate changes. You should be able to use Single Sign on successfully if your endpoint has all the required SSON settings configured

How to disable Pass through Authentication for Citrix Receiver

You can edit the below registry key to disable the Pass through Authentication

1.  Close all the connected Citrix Applications

 2.  Launch the Registry Editor

   a.  Click on Start…Run

  b.  Type “regedit”

  d.  Click OK

 3.  Browse to the registry location HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Citrix\ICA Client\Engine\Lockdown Profiles\All Regions\Lockdown\Logon\Local Credentials

 locate the UseLocalUserAndPassword and update the Value Data  as follows,

 Value name: UseLocalUserAndPassword

Value Type: REG_SZ

Value data: False (instead of default “*”)

After updating this registry value, you will be prompted for Credentials while accessing the Citrix Applications