Posts

Showing posts from December, 2020

Get HBA and Firmware Version on ESXi

Image
 Morning...You need to check the HBA of your ESXi server, but don't like to shutdown and open the case? Your boss is asking for the firmware of your HBA for compatibility for a new SAN Switch? You should check this: Determining Network/Storage firmware and driver version in ESXi 4.x and later (1027206) (vmware.com) anyway...  login to SSH as root in the ESXi server Execute this command to retrieve the list of hba names: /usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -d then execute the following command to get hba details. Replace the las name with your own hba name. /usr/lib/vmware/vmkmgmt_keyval/vmkmgmt_keyval -l -i vmhba4/Emulex You have to navigate to the top to find the info. Don't be silly see you

Powershell Scritp for Inventory VMS in Hyper-V and VMware

Image
 Today I have to create a list of VMS, but with specific information. Usually you will like some basic info from your virtual machines, including, name, amoutn of CPU, RAM and Disk Usage. Seems simple, but the true is a nightmare. The issue is about the Disk usage. When your VMs has only one disk is easy, but what about a machine with 4 disks? What if these disk are thin provisioning and you need to sum the space? Well... here you will learn how, and using simple lines. Get a List of VMS from Virtual Machine Manager If using VMM you can use this method, this will allow a complete list of all hosts and VMS in your environment. #This get the list of all VMs $vms = Get-VM -All #this generate a report including, name, host, status, cpu, ram and disk usage $Report = $vms | select name, vmhost, status, CPUcount, MemoryAssignedMB, @{Name="DiskAllocated";Expression={[math]::round($_.TotalSize/1024/1024/1024,2)}} #this export the report as CSV. Now you can take this to Excel. $Report

GPO for adding site to Trusted Sites Zone in Internet Explorer

Image
 Hello,  Today even when almost nobody uses Internet Explorer, there is someone who is still using it... yes, and you know who is it... Its Your Operating system!! Windows 10 and many applicatinos still uses Internet Explorer for managing security and other settings. I need to add some sites to the Trusted Zone, for an internal project, so in your Enterprise environment the most easy way to doing it is using GPO, but be careful. There are many ways of doing it, and even you can overwritte the complete zone list, or wipe it. I like this method because it only add sites, it doesn't delete anything and even allow your users still modify the zone. It's fine for some environments. As I always recommend, please Create a new GPO for each kind of setting you are modifying. Please do not add your settings into the defaults GPO, or a previous one. The best practice is always managing different GPOs for differnent settings. In this case, You should name this one as "Trusted zone Site

Schedule Exchange Scripts - and email notification

Image
 Hi,  Some times you will need to schedule some task that should be done in non business hours. Instead of doing this manually, always I am trying to automate this tasks. You will gain experience and time for other things, like playing your favorite videogame. In this example I'm going to migrate a mailbox account from my old Exchange Server to a new one, but you can fill the script with anything. First, you will create the Exchange Powershell lines, and then you can put this lines inside a template scritp, which will send you a mail when the task start, and show the result of the commands. This will be useful if you need to know if the script is doing well or you need to throw away the joystick and connect to the server. In this example we are using an Exchange 2016 Server. I need to move the account juanito@example.com to the new database HOORAY-MX2 New-MoveRequest -Identity juanito@example.com -TargetDatabase HOORAY-MX2 -BadItemLimit 50 -Confirm:$false ##########################

Microsoft Flow – Report CRM Cases to Email

Image
  In the following example I am generating a report of CRM Dynamic Cases and sending it via email. During my investigation I discovered that you cannot send reports directly from Dynamics, so using flows is a workaround. Not an easy one, but lets see.   First, we need connection to Exchange Online and Dynamics CRM. We are going to get a list of cases, and then do a “foreach” loop to capture the Customer Name, which is stored in a different table, and populate an Array with this data. Sorry about the localization in the example, I am working form an Spanish computer. First we are going to start with a Recurrence of once per month, but you can choice wherever you want. Then we are going to add “Common Data Service” – List records. You can change the name, and add some filters if you want. In this example I am filtering cases of Statuscode 1 and from specific customer id. Next step,. I am going to Initialize an empty array. Later I will fill this array with results.