Archive for category Uncategorized

Keep your Microsoft environment running smoothly

The full collection of daily, weekly, monthly and annual maintenance tasks to perform to ensure smooth running of your Microsoft environment can be found at http://technet.microsoft.com/library/ee923724.aspx

Hyper-V Survival Guide

Great resource for everything Hyper-V available at http://social.technet.microsoft.com/wiki/contents/articles/125.aspx

Securing NetScaler / AGEE interface

By default when you install a NetScaler or AGEE the admin interface can only be connected to by HTTP. To configure the device to allow you to connect by HTTPS complete the following steps:

1) Connect to the devices configuration utility using a browser
2) Expand the Network node
3) Click on RPC
4) Select the NSIP (NetScaler admin IP Address)
5) Click Open
6) Tick the Secure check box
7) Click OK

Tags: , ,

Installing Windows 8 on XenServer

Having trouble installing the recently released developer preview on XenServer ?

Thomas Koetzing has the fix on his blog

Create a VM with a Windows 7 template and copy the virtual machine UUID from the general tab in XenCenter or use xe vm-list in the CLI. Next you need to run the command xe vm-param-set uuid=<VMUUID> platform:viridian=false

The installation can the proceed as normal.

Tags: ,

Calculating page file size for 64 bit servers

Great article from Microsoft on how to calculate page file requirements when you have large amounts of RAM and reduced paging requirements.

http://support.microsoft.com/kb/2021748/en-us?sd=rss&spid=12925

Tags:

List Active Directory sites and their associated subnets

If you ever need to look up which subnet is associated with which active directory site then just paste the below into vbs and pipe its output to a text file.

‘Get list of AD subnets
Set oRootDSE = GetObject(“LDAP://RootDSE”)
sConfigurationNC = oRootDSE.Get(“configurationNamingContext”)
Set oRootDSE = Nothing
sSubnetsContainer = “LDAP://cn=Subnets,cn=Sites” & “,” & sConfigurationNC
Set oSubnetsContainer = GetObject(sSubnetsContainer)
For Each sResult In oSubnetsContainer
aSNInfo = Split(sResult.cn, “/”)
If Instr(sResult.siteObject, “,”) = 0 Then
sSN = aSNInfo(0)
Else
sSN = aSNInfo(0) & “,” & _
Mid(Left(sResult.siteObject, Instr(sResult.siteObject, “,”) – 1), 4)
End if
wscript.echo ssn
Next

If you name the script listsites.vbs and want to output to a file call sitelist.csv and the script sites in a folder called “support” you can just run the following command line.

cscript c:\support\listsites.vbs > c:\support\sitelist.csv

Tags:

How to reset the admin password for Citrix Licensing Server

Sometimes the Citrix licensing server doesn’t get accessed for a long time, maybe the admin leaves and is replaced and no-one made a note of the password. Suddenly, you can’t access the licensing server any more. What to do ?

If you have access to the disk sub system (ie.. the files) on the licensing server then it is possible to reset the admin password.

1. Open the “server.xml” file in C:\Program Files\Citrix\Licensing\LS\conf. If on Win2k8 you will need to open your editor as an admin. (Take a copy of the file first – if anything goes wrong you can simply copy the file back to restore the original settings).

2. Find the entry that looks something like this:

<user firstName=”System” id=”admin” lastName=”Administrator” password=”(ENC-01)LKJ338u98uxkllS(*U+ljljlja-$78923ghJgs” passwordExpired=”false” privileges=”admin”/>;

3. Erase the contents between the double quotes after “password=”

4. Enter a plain text password , for example password=”TemporaryPassword”

5. Change the passwordExpired value to be “true” and save the server.xml file.

6. Restart the licensing services or, at a push, reboot the server.

7. Log into the licensing console using user name “admin” and the password set above.

8. You will be prompted to change your password. The new password will be encrypted in the server.xml file.

Tags:

Connecting to the registry with PowerPoint

To connect to the registry, we can list our possible choices using get-psdrive. The output will be similar to the below:

Name Used (GB) Free (GB) Provider Root
—- ——— ——— ——– —-
Alias Alias
C 240.39 57.60 FileSystem C:\
cert Certificate \
D 5.81 FileSystem D:\
E 3.64 FileSystem E:\
Env Environment
Function Function
HKCU Registry HKEY_CURRENT_USER
HKLM Registry HKEY_LOCAL_MACHINE
Variable Variable
WSMan WSMan

To mount the registry as a drive enter the command set-location: for example

set-location HKCU:

Note the colon at the end of the command.

You can then list the various items by using ls or Get-ChildItem. Setting the drive to the environment (Set-Location Env:) and then using Get-ChildItem lists all of the environment settings for the system

Tags:

Setting up your PowerShell Environment

Want to have your powershell environment the way you want it each time you start PowerShell ?

Find the location of your default profile by typing profile$ at a PowerShell prompt. That will show you where your default profile script is held. For example:

C:\Users\philipflint\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1

Any statements that you add to this script will automatically be run each time you start PowerShell.

In this way you can call any plug ins or other scripts that you want.

Tags:

Getting Environment Variables with Powershell

Need to know the value of an environment variable on your computer such as the temp path ? Nothing could be easier.

$env:temp

OR

$env:tmp

Wnat to know who you are logged on as ?

$env:username

Want to know what the “path” is ?

$env:path

So, the trick is to enter $env: followed by the environment variable you want the value of. Want to know what environment variables you can use ?

Just access the advanced tab of computer properties and click on the “Environment Vaiables” button

Tags: