Browsed by
Author: Ricky Adams

Finding Mounted Media on VMware VMs

Finding Mounted Media on VMware VMs

Finding Mounted Media on VMware VMs $datacenters=get-datacenter foreach ($dc in $datacenters) { $vms = get-datacenter -name $dc | get-vm foreach($vm in $vms) { if(get-cddrive -VM $vm | where {$_.HOSTPATH -ne $null}) { write-host $vm.name write-host $vm.vmhost write-host $dc.Name write-host „” } } }

Delete VM Snapshots in PowerCLI

Delete VM Snapshots in PowerCLI

Delete VM Snapshots in PowerCLI To view the snapshots for a Virtual Machine before you remove them, you can type the following command replacing VMname with the name of your Virtual Machine: Get-Snapshot VMname | select name,id In the command above, I select to see the name and id which will give you a list of the servers snapshot names and snapshot IDs. The ID will be important to note when being asked to confirm the removal of the snapshot…

Read More Read More

Navigating the vCAC 6.0 Logical Model

Navigating the vCAC 6.0 Logical Model

Source: http://grantorchard.com/vcac/concepts/navigating-the-vcac-6-0-logical-model/ Navigating the vCAC 6.0 Logical Model – 2013 10 Comments I’ve been spending a fair amount of time with my head inside vCAC 6 of late, and one of the things that seems to come up a lot is that people don’t understand the relationships between the various logical constructs that vCAC uses. Here’s a quick rundown on some of the key ones (I’m not trying to be obtuse with these, I promise!): Endpoint Endpoints are your provisioning…

Read More Read More

Consolidate snapshots in vSphere 5 with PowerCLI

Consolidate snapshots in vSphere 5 with PowerCLI

Consolidate snapshots in vSphere 5 with PowerCLI Use PowerCLI to consolidate snapshots in vSphere 5   In vSphere 5 a virtual machine can have a “Virtual machine disks consolidation is needed” Configuration Issue warning in the Summary tab. How can you use PowerCLI to see which virtual machines have this warning? And how can you automate the consolidation of the virtual machine’s disks? List virtual machines that need disks consolidation The PowerCLI command in listing 1 will return all the virtual…

Read More Read More

vCAC/vCO Variables Exposure

vCAC/vCO Variables Exposure

vCAC/vCO Variables Exposure h1,h2,h3,h4,h5,h6,.site-title{ font-family: ‘Open Sans’, sans-serif; } System.log(“Workflow started on vCAC host ” + vCACHost.displayName); System.log(“Got vCAC virtual machine ” + vCACVm.virtualMachineName); System.log(“Matching virtual machine entity ” + virtualMachineEntity.keyString);   if (vCACVmProperties != null) { var log = “”; log += “vCAC VM properties :\n”; var array = new Array(); for each (var key in vCACVmProperties.keys) { array.push(“\t\”” + key + “\”: \”” + vCACVmProperties.get(key) + “\””); } array.sort();   for each (var line in array) { log…

Read More Read More

Configure Multiple or Additional vCloud Automation Center Appliances

Configure Multiple or Additional vCloud Automation Center Appliances

Configure Multiple or Additional vCloud Automation Center Appliances Configure Multiple or Additional vCloud Automation Center Appliances The system administrator can copy the configuration from the primary instance of the vCloud Automation Center Appliance to additional instances to ensure that all appliances in the deployment are configured identically. Procedure 1 Log in to the secondary vCloud Automation Center Appliance that you just deployed by using SSH. 2 Copy the following files from the primary instance of the vCloud Automation Center Appliance…

Read More Read More

PowerCLI to Cleanup Snapshots

PowerCLI to Cleanup Snapshots

PowerCLI to Cleanup Snapshots # Display Snapshots Get-Snapshot -VM * -Name ‘PreUpdate*’ | Select VM,Name,Description # Delete Snapshots Get-Snapshot -VM * -Name ‘PreUpdate*’ | Remove-Snapshot -RunAsync

Networking Ports (TCP/IP and UDP)

Networking Ports (TCP/IP and UDP)

Networking Ports (TCP/IP and UDP) SOURCE Wikipedia Dec 2014 Table legend[edit] Use Description Color Official Port is registered with IANA for the application[1] White Unofficial Port is not registered with IANA for the application Blue Multiple use Multiple applications are known to use this port. Yellow Well-known ports[edit] The port numbers in the range from 0 to 1023 are the well-known ports or system ports.[2] They are used by system processes that provide widely used types of network services. On…

Read More Read More

Parsing HTML to SQL using SQLDOM

Parsing HTML to SQL using SQLDOM

All Articles Source:  http://www.sqlservercentral.com/articles/HTML/88605/ Parsing HTML to SQL using SQLDOM By David Rueter, 2014/12/26 (first published: 2012/04/16)           Microsoft SQL incorporates a good XML parser. Unfortunately, the XML parser is not very useful for parsing out HTML. Why would anyone want to parse HTML in SQL? There are three main reasons that I can think of: Import data contained in HTML directly to SQL tables Manipulate, analyze and/or normalize HTML data Render data stored in SQL…

Read More Read More

NetApp Cabling for Disk Shelfs

NetApp Cabling for Disk Shelfs

NetApp Cabling for Disk Shelfs h1,h2,h3,h4,h5,h6,.site-title{ font-family: ‘Open Sans’, sans-serif; } Cabling the disk shelf SAS data ports The serial attached SCSI (SAS) ports enable each controller in the HA pair to access its own disks and the disks of its partner controller. Before you begin You must have located and marked which disk shelves go with each storage controller. About this task Disk shelf cabling is always isolated within the HA pair that owns the disks. Disk shelves are…

Read More Read More

Using a Red Hat Enterprise Linux Installation DVD as a Software Repository

Using a Red Hat Enterprise Linux Installation DVD as a Software Repository

Using a Red Hat Enterprise Linux Installation DVD as a Software Repository Using a Red Hat Enterprise Linux Installation DVD as a Software Repository To use a Red Hat Enterprise Linux installation DVD as a software repository, either in the form of a physical disc, or in the form of an ISO image file. If you are using a physical DVD, insert the disc into your computer. If you are not already root, switch users to the root account: su…

Read More Read More

SQL Server Developer Interview Questions

SQL Server Developer Interview Questions

Interview Questions – SQL Developer SOURCE: http://www.sqlservercentral.com/articles/Career/96536/ 15 Quick Short Interview Questions Useful When Hiring SQL Developers By Thomas Kovarik, 2014/12/25 (first published: 2013/02/28) Here is a useful exam that you can administer in either 10 or 15 minutes, either oral or written, when you interview for hiring permanent or contract workers for jobs in SQL Server development or support. (This is not a test for SQL Data Base Administrators.) After the list of 15 questions (below) you will find…

Read More Read More

Schedule Weekly Job to Print To InkJet to Save the Print Head

Schedule Weekly Job to Print To InkJet to Save the Print Head

Schedule Weekly Job to Print To InkJet to Save the Print Head Generic Syntax NET USE LPT1 \\server\printer copy C:\YourDirectory\FileYouCreatedWhenPrinting LPT1   Actual Example NET USE LPT1 \\Ricky-HP\HP7610 Echo Print Weekly to InkJet on %date% at %time% >>C:\Data\PrintWeekly\PrintTestPattern1.txt copy /b C:\Data\PrintWeekly\PrintTestPattern1.jpg LPT1

vCenter Server rollup jobs and processing performance data

vCenter Server rollup jobs and processing performance data

vCenter Server rollup jobs and processing performance data SOURCE: http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2007388 Determining if vCenter Server rollup jobs are processing performance data (2007388) Symptoms Excessive growth of the vCenter Server database. vCenter Server rollup jobs do exist. Slow response or timeouts when retrieving performance data. Only Real Time data is available when looking at performance data. When accessing performance data for a period other than the last 24 hours, you see the message: Performance data is currently not available for this entity Resolution…

Read More Read More

Dell FX2 Technology Is Awesome (2015)

Dell FX2 Technology Is Awesome (2015)

Dell FX2 Technology Is Awesome (2015) Whitepaper: http://partnerdirect.dell.com/sites/channel/Documents/PowerEdge-FX-Architecture-Portfolio-Overview-Whitepaper.pdf Additional Reference ————————— SOURCE: http://everythingshouldbevirtual.com/tech-field-day-vfd4-dell-fx-architecture Tech Field Day – #VFD4 – Dell FX Architecture Posted on January 21, 2015 by mrlesmithjr — 1 Comment ↓ Tech Field Day – #VFD4 – Dell FX Architecture Carol Pflueger, Servers Product Manager, introduces the Dell PowerEdge FX architecture First off I would like say that Carol was top notch on this presentation. As always it is awesome to see women in tech breaking it all down; and that she did. I would…

Read More Read More

PowerShell Active Directory Commands

PowerShell Active Directory Commands

PowerShell Active Directory Commands Import-Module ActiveDirectory Set-Location AD: Get-ChildItem Set-Location “dc=rickyadams,dc=com” Set-Location “OU=TestOU” Set-ItemProperty -Path ‘.\CN=Ricky Adams’ -Name “Description” -Value “Virtualization Cloud God” Get-ADObject -LDAPFilter “(&(operatingSystem=Windows Server 2008 R2 Standard) (objectClass=computer))” -SearchBase “dc=rickyadams,dc=com” -SearchScope Subtree Search-ADAccount -PasswordExpired -UsersOnly -SearchBase “OU=TestOU,dc=rickyadams,dc=com” -SearchScope OneLevel   List All Servers in AD Get-ADComputer-Filter {OperatingSystem -Like”Windows Server*”} -Property * | Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap-Auto # Only disabled computer accounts Get-QADComputer-ldapFilter‘(userAccountControl:1.2.840.113556.1.4.803:=2)’# Only enabled computer accountsGet-QADComputer-ldapFilter‘(!(userAccountControl:1.2.840.113556.1.4.803:=2))’ #List Active Servers Get-ADComputer-LDAPFilter“((objectcategory=computer)(&(operatingsystem=*Server*))(&(!(userAccountControl:1.2.840.113556.1.4.803:=2))))” -Property *-SearchBase“OU=Servers,DC=rickyadams,DC=com”| Format-Table Name,OperatingSystem,OperatingSystemServicePack -Wrap-Auto      …

Read More Read More

Windows Group Policy History Stored in Registry

Windows Group Policy History Stored in Registry

Windows Group Policy History Stored in Registry SOURCE: https://support.microsoft.com/en-us/kb/201453       4/15/2015 As Group Policy Objects (GPOs) are read and applied when the computer starts or when a user logs on, information about each of the GPOs applied is written to the registry. This information includes which Group Policy Extensions applied policy, the order in which the GPOs were applied, version data, and options defined for each GPO. This data is also used to determine changes that have been made to the…

Read More Read More

TSQL Table Row Counts for All Database Tables

TSQL Table Row Counts for All Database Tables

TSQL Table Row Counts for All Database Tables SELECT TableName = t.NAME, TableSchema = s.Name, RowCounts = p.rows FROM sys.tables t INNER JOIN sys.schemas s ON t.schema_id = s.schema_id INNER JOIN sys.indexes i ON t.OBJECT_ID = i.object_id INNER JOIN sys.partitions p ON i.object_id = p.OBJECT_ID AND i.index_id = p.index_id WHERE t.is_ms_shipped = 0 GROUP BY t.NAME, s.Name, p.Rows ORDER BY s.Name, t.Name; go  

TSQL Delete Large Number of Rows Without Filling the Transaction Log

TSQL Delete Large Number of Rows Without Filling the Transaction Log

TSQL Delete Large Number of Rows Without Filling the Transaction Log Script to delete in chunks with commit every number of rows:   DECLARE @Count INT Declare @for_delete INT Declare @chunk_size INT SELECT @chunk_size=10000 SELECT @Count = 0 select @for_delete=count(*)from [ION_Data].[dbo].[DataLog2] where TimestampUTC <‘2014-01-01’ While (@Count < @for_delete) BEGIN SELECT @Count = @Count + @chunk_size BEGINTRAN DELETE top(@chunk_size) FROM [ION_Data].[dbo].[DataLog2] where TimestampUTC <‘2014-01-01’ COMMIT TRAN   Ref Source: http://dbtricks.com/?p=44  5/22/2015