Posts

Showing posts from 2013

Veeam backup fails with "Cannot start service"

I've cut and pasted this from  http://social.technet.microsoft.com/Forums/windowsserver/en-US/9cf42e8a-2a33-47c5-a797-269330e9ba1a/vss-writer-fails?forum=winserverfiles This solves an issue we were seeing when using Veeam to backup an Exchange 2010 CAS server.  The job failed with error: Processing 'ServerName' Error: Cannot start service. Machine [IP].Service[VeeamVssSupport]. Cannot start service. Win32 error: The system cannot find the file specified. Code 2. We found this link and in the middle of the forum this snippet: "Please open the Disk Management console, located at "Server Manager\Storage\Disk Management" and see which partition has been marked as Active volume. If the Active volume is different from the volume in which you install the operating system, try changing the Active volume to the volume containing the operating system by using the following commands: 1. Open a command prompt as Administrator. 2. Run diskpart. 3.

Powershell to find logged in users...

You may find this useful. I found that my account was getting locked out from some RDP session I'd disconnected sometime ago...naughty naughty... Anyways here is some Powershell to list users with TS Sessions... You need the PSTerminalServices add in  http://archive.msdn.microsoft.com/PSTerminalServices And to make things easier (for me) I created a list of all my servers called "serverlist.csv" Import-Module PSTerminalServices $MachineList = Get-Content -Path c:\serverlist.csv; # One system name per line foreach ($Machine in $MachineList) {     "---------" + $Machine + "---------"     Get-TSSession -ComputerName $Machine -erroraction 'silentlycontinue' | Select UserName,State     "---------------------------------" } Here's a version for specific username Import-Module PSTerminalServices $MachineList = Get-Content -Path c:\serverlist.csv; # One system name per line foreach ($Machine in $MachineList) {    

PostFix SMTP Relay

The Exchange guy came up with a pretty neat solution to an issue we have when dealing with one of our core systems. This system needs to send emails.  Far enough.  However this system doesn't do authenticated SMTP.  Ok that's not great but many things don't do authenticated SMTP. The system is installed on client machines.  Err sorry what?  You need client machines to relay through the Exchange environment? User says: "It worked before we went to Exchange 2010" Exchange Guy "How?!" After a few moments of checking the old 2003 Exchange environment... Exchange Guy "Holy Cow!  All users can open relay!" Oh great.  o now the business wants business as usual.  IT Team want secure as possible SMTP.  Push you .  Pull me.  We can't allow open relay for various reasons most of which are clearly documented out in the web :) Exchange Guy "Why not use an SMTP smarthost relay!" Awesome.  Trouble goes away. I put in place a Deb

Citrix XenApp 6.5 and Powershell

Cool! Citrix has powershell.  First thing I did was run a request to update all the group memberships from a confusing array of what looks like an organic process whereby users and groups are used with abandon to ACL Citrix applications. So what I did was list out all the applications and then using Quest AD tools create groups called "XenApp - " + <application name> this worked great! I couldn't get the remoting to work - we don't have a PKI here?!?!  SO this is a two stage process, output the applications to a csv and the import to create the groups. Next I populated each application with these groups.  Nothing worked.  I first thought that the error - Cannot find group - meant that replication hadn't happened.  So I waited.  This was not the case. It seems that Quest AD tools do not create the pre-Windows 2000 name for the group.  This is what Citrix uses to ensure that the group exists before it will assign this to an application. I could not f

vSphere plugin to show snapshots

I've mentioned before that making vSphere plugins is a bit hit and miss...it seems that things have progressed some what since I last attempted this and in vSphere 5.1 things are much much easier! I wrote some powershell which put a html file containing all snapshots in the environment into the root of an IIS website.  The website was set to use this page as the default.  A scheduled task runs this each night.  Then I added a plugin to vSphere referencing the website and now we are able to see all the snapshots currently in use! Hoorah! Here's the powershell (we use Veeam and I've made it so that the Veeam replicas are not shown) # Powershell to show current running snapshots # open the vSphere powershell Add-PSSnapin VMware.VimAutomation.Core -ErrorAction SilentlyContinue # Connect to VCS-002 $server = Connect-VIServer GBR-LON-VCS-002.EDFMAN.NET # Now Output all the VMs which have snapshots - ignoring those Veeam replicas $data = Get-VM | Get-Snapshot | ?{

FTP SSL and User Isolation all at once...

For a while now I've had a nice FTP server running on IIS 7 with User Isolation setup so that sub folders of LocalUser are isolated per user. Nice little feature. We recently had a third party require FTP access. "Easy" I thought and made a new account and folder on the FTP server and gave the third party the details. Fine they said, although this isn't SSL.  Ah said I. And simply put our wildcard cert on the server and enabled SSL binding the added cert. Nope, things looked ok from my FileZilla client however directory listings were failing when using SSL. I was using explicit mode and I was able to connect and log into the FTP site but getting my home folder always failed with a timeout. After A LOT of messing around and Googling. I found this page... http://geekswithblogs.net/QuandaryPhase/archive/2013/01/29/configuring-ftp-over-tls-in-iis-with-user-isolation.aspx Which says you can do what I want! This was the only page I found which actually wa

Disk Calculator HTML 5?

Here a small applet which will help you calculate the increase in disk space required to meet a threshold Enter current disk size (GB): Enter current free space (GB): Enter required % free space: Increase your disk by (GB):

When a snapshot isnt.

I came into the office this morning to see one of our Exchange 2010 VMWare boxes in disarray. Great start to the morning.  Did I say it was raining too? The DAG had failed over correctly so users were unaffected.  At least one thing was going my way! The error we saw on vSphere: "There is no more space for virtual disk xxx-000002.vmdk. You might be able to continue this session by freeing disk space on the relevant volume, and clicking Retry.  Click Cancel to terminate this session." We quickly found the LUN that the disk in question was sitting on and then browsed that LUN. Now is the time I will say we use Veeam for our backups.  This is nothing to do with their excellent system which two days previous had saved us from a SQL DB corruption - I have to get that point in as I would not want anyone to think this is in any way Veeams fault. Ok back on track... Veeam had run a backup of Exchange 2010 and failed due to the disk space issue.  Veeam uses snapshots.

PoshPAIG

Back again with some more information on the Scripting Guys' powershell for patching and auditing. If you have missed the first blog I found this whilst looking for something to help manage patches... I've not run this a couple of times in my environment (on servers which have no customer impact!) with good results. Here's my findings... Requirements: Install Net Framework 4 Install Powershell 3 Download both components: http://poshpaig.codeplex.com/releases/view/100929 http://technet.microsoft.com/en-us/sysinternals/bb897553 You may need to bypass the execution policy set-executionpolicy bypass You may need to add a firewall rule to your servers Rule Type:  Custom Rule Program - Keep defaults Protocol Type:   TCP   Local port: RPC   Dynamic Ports Scope - Keep defaults Action - Keep defaults Profile - Keep defaults Name it.  Finish What I did: Export list from vSphere client of all VM's Edit t

Disk Space Calculator?

One of the many things I deal with is monitoring servers. Those familiar with these tools will know about thresholds.  Typically disk thresholds are normally percentages of free space. So to keep those thresholds happy we need to manage the disk space. This leaves a question.  How much do you extend your disk by to satisfy the thresholds? Here is a formula: X=(((A-B)/(100-C)*100)-A Where: X = Space needed to add (GB) A = Current disk size (GB) B = Current free space (GB) C = Threshold limit (%) As an example: A 140GB disk blows the 10% threshold in Operations Manager, lets say the disk has 14GB free so you need to add some space to take it to 15% to satisfy the threshold with some head room. A = 140 B = 14 C = 15 X = (((140-14)/(100-15)*100)-140 X = ((126/85) * 100) - 140 X = 148.23 - 140 X = 8.23 So an increase of 8.23GB would yield 15% free space. Hope that helps.

Patch Adams

So whilst looking for better ways to manage the patching of my server estate I stumbled upon this from the Scripting Guys... http://poshpaig.codeplex.com/ I assume you know all about the Powershell commands too....I think I blogged this last year but here they are again... http://poshwsus.codeplex.com/ Early days for my use of this but I will post something later when I get into the meat and bones of PoshPAIG. One thing to note is that you need Powershell 3 and Net 4 to run this without errors. Enjoy.

New job old game

Spent a couple of months changing jobs.  Hence no updates to this blog. Settling into my new place now so hopefully will get blogging again.