Skip to main content

Posts

Showing posts with the label PowerShell

Power Shell : Check Microsoft Service Name / Display Name

One line script - a quick note for myself. To find the service display name based on service name get-service -Name "<serviceName"> To find the service name based on service display name get-service -DisplayName "<serviceDisplayName">

Citrix Studio - Change Hypervisor Connection

In Citrix Studio, it is possible to create a new hypervisor connection, and move the VMs to that new connection. The reason new connection be created and we move VMs to that connection can be varies – from commissioning new vCentre server to changing to a new hypervisor platform (from Microsoft Hyper-V to VMware vSphere). This post will explain on how to change the connection from current to a new one. The connection needs to be already established prior to implementation of this steps.  RDP to Citrix Studio server, and launch PowerShell . Add Citrix snap-in by following below command. Command : asnp citrix* Identify current and to be used Broker Connection IDs by using below command. In this example, I want to change  from H ypervisor Connection UID 1 to Hypervisor Connection UID  3 Command : get-BrokerHypervisorConnection

PowerShell - To Perform DNS Resolution Check-Up

So this is my second PowerShell script created by me. The first one was so simple and I use it in my XenDesktop environment. This script on the other hand, is aprt of my initiative in performing Active Directory clean-up in my environment.  The task of the script is simple - check the IP address of a machine name, then check the hostname of that IP address.  - If the machine name (A host record) and the hostname (PTR record) is similar, we are good.  - If the machine name (A host record) and the hostname (PTR record) is different, error prompted - If the machine name (A host record) is available but the hostname (no PTR record) is not, error prompted - If the machine is not avaiable (no A host record), error prompted. I use  $PSScriptRoot so the location of the script is dynamic, it does not necessarily need to be put at a specific location. This is only part 1. I wish to add more features so it could be better next time. ###################################

Citrix Studio – Receive ‘Error Expanding Nodes’ Error While Adding VMs from PVS

While adding VMs created by Citrix Provisioning Services, you may receive this error : Error : ‘Error expanding node’ . This issue occurred as the machine catalogue was initially created in PVS version 6.x. and current PVS version is higher than that. This is a well-known issue and a Citrix article is available here . Get It Resolved : RDP to Citrix Studio server, launch PowerShell console. Add Citrix snap-in by inserting below command : Command : asnp Citrix*    List all Machine Catalog configured in the environment by inserting below command Command : get-BrokerMachine    All Machine Catalog information listed

How To : StoreFront Factory Reset / Rejoin Citrix StoreFront to Server Group

In some situations, you may need to unjoin a StoreFront server from an existing server group, and join the server to a different server group. However, after you remove it, there is no option to add it back. You will see this screen at your StoreFront server. So, what it The easiest way? Reinstall StoreFront! .  However, there is another cool way to do this, especially if you want to show off in front of your customers (no, I have never done this), or if you want to flaunt your expertise in front of your juniors (never done this as well). Description : StoreFront Factory Reset / Rejoin Citrix StoreFront to Server Group How To Do :  Close all opened / active Storefront consoles. You will get error if there is active session. Launch PowerShell as Administrator.  Type asnp Citrix*  Browse to %Program Files%\Citrix\Receiver StoreFront\Scripts  Run ImportModules.ps1   Modules imported Run this command : Clear-DSConfiguration Command completed.  

Error on Powershell - 0xffff0000

I am not very familiar with PowerShell, yet... really. Currently, my main scripting language is VBScript. However, I am truly believe the needs to learn PowerShell is keep increasing every single day. Server 2008 and Server 2012 are equiped with PowerShell, some advanced managements in XenDesktop 7.5 are using PowerShell, it is fun to learn PowerShell (they said), and a few other points mentioned by my colleagues ( Wow, what on earth Heiry, why your introduction is longer than an episode of Dads? ) Issues : Error encountered when a scheduled task created to run PowerShell script : The shell cannot be started. A failure occurred during initialization: Object reference not set to an instance of an object. Furthermore, this error reported on Task Scheduler. Troubleshooting   Go to Start > Run , and type regedit . Press Enter   Registry Editor launched. Browse to My Computer > HKEY_CURRENT_USER , and look for for Environment folder. It is not there.