#Enter your vCenter Host below
$vcenter = "ntc-vc5-01"
#Enter the CSV file to be created
$csvfile = "VM_Birthdays.CSV"
################################
#Load the VMware Powershell snapin if the script is being executed in PowerShell
Add-PSSnapin VMware.VimAutomation.Core -ErrorAction 'SilentlyContinue'
#Connect to the vCenter server defined above. Ignore certificate errors
Write-Host "Connecting to vCenter"
Connect-VIServer $vcenter -wa 0
Write-Host "Connected"
Write-Host ""
#Check to see if the file exists, if it does then overwrite it.
if (Test-Path $csvfile) {
Write-Host "Overwriting $csvfile"
del $csvfile
}
#Create the CSV title header
Add-Content $csvfile "VM,Born on,Creator,Creation Type,Event Message"
#Gather all VM's from vCenter
$vms = Get-VM | sort Name
foreach ($VM in $vms) {
Write-Host "Gathering info for $VM"
#Search for events where the VM was deployed from a template
$vmevents = Get-VIEvent $VM -MaxSamples([int]::MaxValue) | Where-Object {$_.FullFormattedMessage -like "Deploying*"} |Select CreatedTime, UserName, FullFormattedMessage
if ($vmevents)
{
$type = "From Template"
}
#If no events were found, search for events where the VM was created from scratch
if (!$vmevents) {
$vmevents = Get-VIEvent $VM -MaxSamples([int]::MaxValue) | Where-Object {$_.FullFormattedMessage -like "Created*"} |Select CreatedTime, UserName, FullFormattedMessage
Write-Host "Searching by Created"
$type = "From Scratch"
}
#If no events were found, search for events where the VM was cloned
if (!$vmevents) {
$vmevents = Get-VIEvent $VM -MaxSamples([int]::MaxValue) | Where-Object {$_.FullFormattedMessage -like "Clone*"} |Select CreatedTime, UserName, FullFormattedMessage
Write-Host "Searching by Cloned"
$type = "Cloned"
}
#If no events were found, search for events where the VM was discovered
if (!$vmevents) {
$vmevents = Get-VIEvent $VM -MaxSamples([int]::MaxValue) | Where-Object {$_.FullFormattedMessage -like "Discovered*"} |Select CreatedTime, UserName, FullFormattedMessage
Write-Host "Searching by Discovered"
$type = "Discovered"
}
#If no events were found, search for events where the VM was connected (typically from Backup Restores)
if (!$vmevents) {
$vmevents = Get-VIEvent $VM -MaxSamples([int]::MaxValue) | Where-Object {$_.FullFormattedMessage -like "* connected"} |Select CreatedTime, UserName, FullFormattedMessage
Write-Host "Searching by Connected"
$type = "Connected"
}
#I have no idea how this VM came to be.
if (!$vmevents) {
Write-Host "No clue how this VM got here!"
$type = "Immaculate Conception"
}
#In some cases there may be more than one event found (typically from VM restores). This will include each event in the CSV for the user to interpret.
foreach ($event in $vmevents) {
#Prepare the entries
$birthday = $event.CreatedTime.ToString("MM/dd/yy")
$parent = $event.Username
$message = $event.FullFormattedMessage
#Add the entries to the CSV
$write = "$VM, $birthday, $parent, $type, $message"
Add-Content $csvfile $write
}
}
Welcome to my VMWare resource pool!
"One small step for man, One giant leap for virtualization!
Tuesday, November 3, 2015
Monday, November 2, 2015
How can I disable the User Account Control (UAC)
Windows has the built-in ability to automatically reduce the potential of security breaches in the system. It does that by automatically enabling a feature called User Account Control (or UAC for short). The UAC forces users that are part of the local administrators group to run like they were regular users with no administrative privileges.
(You can't do it natively in GPMC for 2003. you can add a 2008 server and make your your group policy manager or use a bat file to kill the uac. You can run this bat file as a startup script and it should work. or take the registry key and create a custom ADM that will then allow you to manage it through GPMC. here is the command that you would run in the bat)
C:\Windows\System32\cmd.exe /k %windir%\System32\reg.exe ADD HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System /v EnableLUA /t REG_DWORD /d 0 /f
LINK
Trace Processes, Applications, active files, and modify registry permissions.
Find out what registry setting and file settings that you need access to with procmon, filemon and regmon and use the default windows tools called cacls and regini to change those so you have proper access.
Process Monitor v3.2 link
CACLS.exe
Access Control Lists apply only to files stored on an NTFS formatted drive, each ACL determines which users (or groups of users) can read or edit the file. When a new file is created it normally inherits ACL's from the folder where it was created.
Link1
Link2
RegINI
Set permission on Registry Keys
Link
Alternative RunAs
- Create a Scheduled Task in the task scheduler. The scheduled task launches the application. Set the task to run at highest privilege level.
- Create a shortcut on the desktop of all the users needing to run the application. The shortcut ended up looking like this:
C:\Windows\System32\schtasks.exe /run /tn "Name of task"
The only downside of this is that i need to create a separate task for every user, but I think it works just fine.
Monday, October 12, 2015
Wednesday, July 22, 2015
Friday, July 10, 2015
VMware Storage I/O Control
VMware Storage I/O Control
VMware introduced a feature called Storage I/O control (SIOC), which enables you to perform attenuation of the I/O for each virtual disk you choose. The SIOC feature in vSphere 5.x is disabled by default. Storage I/O Control provides I/O prioritization of virtual machines running on a cluster of vSphere hosts that access a shared storage pool.
It extends the familiar constructs of shares and limits, which have existed for CPU and memory, to address storage use through a dynamic allocation of I/O queue slots across a cluster of vSphere hosts. When a certain latency threshold is exceeded for a given block-based storage device, SIOC balances the available queue slots across a collection of vSphere hosts; this aligns the importance of certain workloads with the distribution of available throughput.
This balancing can reduce the I/O queue slots given to virtual machines that have a low number of shares, to provide more I/O queue slots to a virtual machine with a higher number of shares. SIOC reduces I/O activity for certain virtual machines so that other virtual machines receive better I/O throughput and an improved service level.
For more information, refer to the technical white paper: vmware.com/files/pdf/techpaper/VMW-Whats-New-vSphere41-Storage.pdf VMware Storage I/O Control and the HP MSA 2040 Storage system combine to provide a more performance-optimized storage solution. Enabling Storage I/O control is a simple process. More important is an understanding of the virtual machine environment with regard to the I/O demand being placed on the array. Storage I/O control is not dependent on the array; it is more of a VMware vSphere infrastructure solution.
VMware introduced a feature called Storage I/O control (SIOC), which enables you to perform attenuation of the I/O for each virtual disk you choose. The SIOC feature in vSphere 5.x is disabled by default. Storage I/O Control provides I/O prioritization of virtual machines running on a cluster of vSphere hosts that access a shared storage pool.
It extends the familiar constructs of shares and limits, which have existed for CPU and memory, to address storage use through a dynamic allocation of I/O queue slots across a cluster of vSphere hosts. When a certain latency threshold is exceeded for a given block-based storage device, SIOC balances the available queue slots across a collection of vSphere hosts; this aligns the importance of certain workloads with the distribution of available throughput.
This balancing can reduce the I/O queue slots given to virtual machines that have a low number of shares, to provide more I/O queue slots to a virtual machine with a higher number of shares. SIOC reduces I/O activity for certain virtual machines so that other virtual machines receive better I/O throughput and an improved service level.
For more information, refer to the technical white paper: vmware.com/files/pdf/techpaper/VMW-Whats-New-vSphere41-Storage.pdf VMware Storage I/O Control and the HP MSA 2040 Storage system combine to provide a more performance-optimized storage solution. Enabling Storage I/O control is a simple process. More important is an understanding of the virtual machine environment with regard to the I/O demand being placed on the array. Storage I/O control is not dependent on the array; it is more of a VMware vSphere infrastructure solution.
Subscribe to:
Posts (Atom)
Vmware NSX SSL creation
Using OpenSSL for NSX Manager SSL import: Creates CSR and 4096 bit KEY Creating NSX 6.4.2 SSL openssl req -out nsxcert.csr -newkey rsa:40...
-
vmware converter – p2v – partition number must be set for the boot volume Leave a reply I was trying to archive old machine running R...
-
Configure PSC HA in vSphere 6.5 – Part 1 – Configuring Certificates PSC65-A.lab.local -- 192.168.1.211/24 PSC65-B.lab.local --...
-
root@vcsa1 [ ~ ]# service-control –stop –all Perform stop operation. vmon_profile=ALL, svc_names=None, include_coreossvcs=True, i...


