A few weeks ago I needed to sort out some extended warranty for a customers servers. To do that I needed the serial numbers of those servers, (a mixture of IBM/Lenovo and Dell Servers).
As I didn’t fancy a drive to two different datacenters, I wanted to try and get them programatically.
Solution
After some searching I came across a post by one of my old EE buddies LucD with exactly what I needed. I’m assuming you have PowerCLI setup before beginning.
Connect to your Virtual infrastructure;
[box]
Connect-VIServer {vCenter-server-FQDN}
[/box]
Then, (assuming you have a folder called C:\Temp that you can write to).
If you have fiber channel switches, (regardless of the vendor,) scratch the surface and underneath it’s probably a Brocade. (Unless it’s a Cisco Nexus then you are in the wrong place my friend, move along!) e.g an HP StorageWorks 8/8 SAN Switch (Yeah it’s a Brocade 6505), or an IBM SAN24B-4 Express Fabric Switch (you guessed it, Brocade).
If you need to get the serial number for them, here’s how.
Solution
SSH into the switch, and issue the following command;
[box]chassisshow[/box]
I need the Brocades Vendor Serial Number!
For ‘re-badged’ Brocades, some vendors, (HP for example), have a ‘Suppler Serial Number‘ also, you need to GUI into the switch manager to get that, (that means using a browser and having Java installed!) Warning: You will need to enter the switches IP or FQDN into the the ‘Safe’ list in the Java settings in the Control Panel or this will fail. Typically you then browse to http://{IP-Address}/switchExplorer_installed.html to then get access.
Go here;
1: Is the Brocade Serial Number.
2. Is the Supplier (Vendor) Serial Number.
Related Articles, References, Credits, or External Links
I’ve got a client that has a couple of Storwize V5000 storage arrays. I needed to get the serial numbers for them today, but I could not find them in the GUI?
Solution
As usual things are much simpler at command line, SSH into the storage array and simply use the following command;
[box]lsenclosure[/box]
Note: As you can see, I’ve got one Controller (with the cans in it,) and one expansion shelf. The first part of the serial denotes the model e.g. 2078-24C denotes v5000 Series controller, so in this case the serial number would be 2078-24C / 78A3381 and I’ve got an Expansion Shelf 2078-24E / 78D2CTT.
Related Articles, References, Credits, or External Links
If you have an iLO/iDRAC/EMM, then logging into these will give you the servers serial number, but what if they are not setup/connected, or you don’t know username or password?
Then you can use WMI to discover the serial number.
Since Exchange 2013 we have been able to manage Exchange remotely through the Exchange Admin Center, but what if you want to use the Exchange Management Shell remotely?
Install Exchange Management Tools
This is not just the Management Shell, this will also install the Toolbox and additional help.
There are few prerequisites, but to install from a normal PowerShell prompt;
Once Installed, You can launch the Shell itself, or you can add the Exchange PowerShell commandlets to a normal Powershell session, with the following command;
I’ve not had to do this since the days we got “The terminal server has exceeded the maximum number of allowed connections” errors. Now thankfully Windows Server tells us who is logged on so we can ‘ask politely’ before we boot them off!
Today though, my user session got all messed up, and I needed to kick ‘myself’ off remotely, (and have a fresh session.)
Solution
From a remote machine run the following command, to see who is logged on and, (more importantly get the session number for that user);
[box]QUser /SERVER:{Hostname}[/box]
Above the ID of ‘1’ denotes the session number, select the one that corresponds with the user you want to log off. Then issue the following command;
Seen when attempting to connect to a remote machine via Remote Desktop;
The remote computer that you are trying to connect to requires network level authentication (NLA), but your windows domain controller cannot be contacted to perform NLA. If you are an administrator on the remote computer, you can disable NLA by using the options on the remote tab of the System properties dialog box.
Well the clue is in the error massage, RDP is enabled but it requires NLA authentication. e.g. This box has been selected.
Now, if you want NLA that’s fine, make sure your RDP client has been updated, and you, and the target, are domain authenticated, and can see a domain controller. But what if that computer is on a remote site, and you need to get on it? Or it’s in the server room downstairs and you’re lazy like me!
Well the simplest way to get on is to use a LOCAL account on that machine, (if you know the username and password for a LOCAL account,) like so;
WARNING/DISCLAIMER
This article was written at a time when clients may not have had up to date RDP clients that supported NLA, that’s no longer the case (If you are in a sole Windows environment, and you are updating your clients). Simply disabling NLA is NOT a solution. I’m really getting tired of people posting comments saying ‘This is a bad article’ and ‘I don’t understand’. Well how about you have 500 linux based thin clients that use RDP software that does not support NLA? Before posting a criticism please take some time to work in, and support a few different environments guys. And appreciate that you are here because you couldn’t fix it yourself, so you clicked on the link to come here, to read information that I’m providing for free, in my own time, to help you out.
Disable NLA Remotely (via Registry)
Read above disclaimer before proceeding
The drawback of this method is it usually requires a reboot (which we can do remotely, but if it’s a production server that will mean some downtime).
Open Regedit > File > Connect Network Registry > Search for and select your target machine > OK.
Navigate to;
[box]HKLM > SYSTEM > CurrentControlSet > Control >Terminal Server > WinStations > RDP-Tcp[/box]
Locate the following two values, and set them to 0 (zero)
SecurityLayer
UserAuthentication
Give it a try now, but I found I needed to reboot the target first, using the ‘restart-computer’ PowerShell Commandlet.
Disable NLA Remotely (via PowerShell)
Read above disclaimer before proceeding
I prefer this method as it works instantly, and can be reversed just as quick! Open an administrative PowerShell command window. Execute the following two commands;
I seem to get all the PKI/Certificate services problems! Yesterday I was trying to use the web enrolment portal on a certificate services server, and could not get in locally, (or remotely) via http, (or https) it simply showed me a 403.14 error.
HTTP Error 403.14 Forbidden
Solution
This was an odd one, in IIS Manager select the ‘Certsrv’ virtual directory > Advanced Options > And look at the ‘Path’.
Mine was missing the ‘en-us‘ folder from the end of the path!
Note: You will need to open an administrative command window, and then execute an iisreset command, before the change will take effect.
Related Articles, References, Credits, or External Links
Got in the office to find a colleague was going to be on long term sick this morning, the boss asked, “Can we turn on his out of office?”. I could have simply changed the users password and logged into OWA and done it, but executing some PowerShell would be more elegant.
Note: You must be in one of the following groups to carry out this procedure, Organizational Management, Recipient Management, or Help Desk.
Note: Remember the dates need to be in ‘American date format’ or the command will fail.
Example
[box]
Set-MailboxAutoReplyConfiguration -Identity 'PeteL' -StartTime '08/12/2013 08:00' -AutoReplyState Enabled -EndTime '12/31/2013 23:59' -InternalMessage 'Pete is currently out of the office' -ExternalMessage 'Pete is currently out of the office, please contact the helpdesk for technical assistance' -ExternalAudience 'All'
[/box]
Related Articles, References, Credits, or External Links