Skip to main content

Posts

Showing posts from June, 2011

SCVMM Error (2912) when creating a VM from the Self-Service Portal workaround

While using the Self Service Portal on SCVMM, I received this error when creating a virtual machine.   Error (2941) VMM is unable to complete the request. The connection to the agent on machine [SCVMMServer] has been lost. (Unknown error (0x80072efe)) Recommended Action Ensure that the WS-Management service and the agent are installed and running and that a firewall is not blocking HTTP traffic.   In the job details, the error occurred at step 1.5 Install VM Components .  This issue was reported to Microsoft on October 12, 2008.  The suggested fix on June 26, 2011 does work, but with an issue.  If you were using quotas to help manage the resources your users were consuming, the record of this quota usage will be lost.  The users quota will have those points returned to it as if they are not being used.   To prevent the loss of data associated with the host, here is an easy alternative.   Go to the Hyp...

How many hosts and VMs can VMM R2 support?

System Center Virtual Machine Manager can support up to 400 hosts running up to 8,000 virtual machines.  If your needs go beyond this, remember these tips: Each instance of VMM Server must be installed on a separate computer. Each instance must have its own database. Each host or library can only be managed by one VMM server at any one time.

Private IP Address

The Internet Assigned Numbers Authority (IANA) have reserved the following IPv4 ranges for internal, private use.   IP Address Range Subnet Number of addresses 10.0.0.0-10.255.255.255 255.255.255.0 16,777,216 172.16.0.0 – 172.31.255.255 255.240.0.0 1,048,476 192.168.0.0 – 192.168.255.255 255.255.0.0 65,536   The IPv6 equivalent has an address block of fc00::/7

Manually Deploy SCVVM Agent

The System Center Virtual Machine Manager (SCVMM) agent allows a SCVMM server to manage the virtual machines on that host. When you use the SCVMM console to add a host, the SCVMM agent software is installed on that host. If the host is in a perimeter network or not on the domain, you need to add the agent software manually before joining it to a VMM server. Before you install the SCVMM agent, your host must meet the following requirements. (List below provided by Microsoft) An operating system supported by VMM. For more information about operating systems supported by VMM, see Supported Operating Systems for Virtual Machine Manager . One of the following versions of Microsoft Virtual Server 2005: · Microsoft Virtual Server 2005 R2 or above. · Microsoft Virtual Server 2005 R2 x64 SP1 or above. Windows Remote Management (WinRM). You must install this software from the following site: http://go.microsoft.com/fwlink/?LinkId=84599 . If you are using Windows Server 2008,...

Super netting

Even though we appear to be in the twilight years of IPv4, you may still be faced with the question of super netting. In the IPv4 world, we use a subnet mask to separate the network and host portion of an IP address.  With the IP address divided into 4 groups representing 8 bits, the normal subnets look like this: 255.0.0.0 255.255.0.0 255.255.255.0 The 255 is the decimal representation of 8 bits, all set to ‘1’.  The 0’s are the decimal representation of 8 bits, all set to ‘0’.  This makes subnetting easy.  Let’s say you need a subnet that can handle 4000 hosts?  Standard subnets will not work.  Here is how you figure out the subnet ID Convert the 4000 to binary.  User the programmer mode on the Windows calculator Just type in 4000 in DEC mode, and then switch to BIN mode. The binary for this is 11111010000 If we add some leading zeros to make this an even 16 bit number, we get 0000111110100000 Now, place them into octets. ...

Setting DNS and Default Gateway Settings for IPv6 with DHCPv6

This is a posting in response to my posting last October about how to set up DHCP on Windows Server 2008 to deliver IPv6 addresses. The question was how to publish the DNS and Default Gateway addresses to your IPv6 clients.  I’m sorry to say that the Microsoft implementation of DHCPv6 does not have these options.  So, here is an alternative…Create a login script. After reading through the manual method posted at TechNet , I found two examples.  One to set the Default Gateway and one to set the DNS addresses.  Below is the relevant sections of that TechNet article with the examples in red. Adding Default Gateways To configure a default gateway, you can use the netsh interface ipv6 add route command and add a default route (::/0) with the following syntax: netsh interface ipv6 add route [ prefix= ] ::/0 [ interface= ] Interface_Name_or_Index [[ nexthop= ] IPv6_Address ] [[ siteprefixlength= ] Length ] [[ metric= ] Metric_Value ] [[ publish= ] no | yes | immorta...

Can you have more than 4 partitions on an MBR disk if they do not have assigned driver letters?

This question came up during a 6292 class.  To test this out I created a Windows 7 Virtual machine and added a 5 GB hard drive to it. I then brought the hard drive online as an MBR disk and began creating simple volumes of 8 MB in size.  Instead of drive letter, I selected Do not assign a drive letter or drive path . Once I created the fourth partition, the limit of an MBR disk, Disk Manager created an extended partition. I could continue to add partitions within the extended partition. I then converted Disk 1 to a GPT disk. That allowed me to continue adding partitions. I also tried deleting all the volumes and then using the Diskpart tool to create the partitions: Just for the fun of it, I converted the drive to a GPT disk and was able to successfully create 127 partitions.

WUAUCLT Switches

In Lab 12 of 6294: Planning and Managing Windows 7 Desktop Deployments and Environments, we had a question about the parameters for Wuauclt .  In our books, the short versions of the parameters were used. Despite the documentation at Microsoft on the wuauclt command , the help file does not display.  Here are the parameters that I have been able to find information on. /a   or /ResetAuthorization Initiates an asynchronous background search for applicable updates. If Automatic Updates is disabled, this option has no effect. /r   or /ReportNow Sends all queued reporting events to the server asynchronously. /detectnow Allows a client to start the detection process immediately. Below is the list of switches that I have not been able to get definitive answers on. /RunHandlerComServer /RunStoreAsComServer /ShowSettingsDialog /ResetEulas /ShowWU /ShowWindowsUpdate /SelfUpdateManaged /SelfUpdateUnmanaged /UpdateNow /ShowWUAutoS...

Excel Boarder Properties with PowerShell

The function below will display the values of various properties of borders in Excel.  This script is designed to help programmers find the appropriate values that they need. <# . SYNOPSIS Displays the attributes and results for several Excel boarder Properties . . DESCRIPTION This function will launch an Excel spreadsheet . It will then display the properties for style , color , and weight for borders . #> Function Display-ExcelBoarders { $a = New-Object -comobject Excel.Application $a . Visible = $True $b = $a . Workbooks . Add () $c = $b . Worksheets . Item ( 1 ) # Display Borders # Column Header $C . Cells . Item ( 1 , 1 ) = ".Borders.LineStyle = " # AutoSize the Column $C . Cells . Item ( 1 , 1 ) . EntireColumn . AutoFit () # Valid range for LineStyle is 0 through 13. For ( $x = 0 ; $x -lt 14 ; $x ++ ) { $C . Cells . Item ( $x + 2 , 1 ) = $x $C . Cells . Item ( $x + 2 , 1 ) . Borders . LineStyle = $x ...

Hyper-V R2 SP1 Dynamic Memory

Until now, you were not able to over allocate RAM to virtual machines running Hyper-V.  You could allocate enough static RAM to a set of VMs that would exceed the total amount of RAM on the server, but you would not be able to start all your virtual machines. Part of server consolidation is the ability to take servers that are underutilized and move their operations to a single server.  This has worked well however, even when a virtual machine was not taxed to its maximum memory load, it still consumed the same amount of memory and therefor was a hindrance to further consolidation. Dynamic memory allows you to safely increase the VM density on a server.  This feature requires Windows Server 2008 R2 SP1 and is available on the following guest partitions: Windows Server 2003 Enterprise and Datacenter with SP2 (32 and 64-bit versions) Windows Server 2003 R2 Enterprise and Datacenter with SP2 (32 and 64-bit versions) Windows Server 2008 Enterprise and Datacenter (32 an...

Test to see if a file exists using PowerShell

Normally I would use just the Test-Path cmdlet for this.  The requirement of a project that I’m on needed a “user friendly” output option as well.  Below is an example of that user friendly output. Here is the code: <# . SYNOPSIS Test to see if a file exists . . DESCRIPTION Returns TRUE if the file submitted is exists . Returns FALSE if it does not . . PARAMETER ExcelFile The name of the file being tested . EXAMPLE get - excelFile Det1 . xls - DisplayInfo File found True Verifies that a file names " Det1 . xls " exists and also displays the user friendly information of " File Found " to the display . The value of TRUE was returned to the pipeline . . EXAMPLE get - excelFile " demo . xls " File not found Verified that the file named " demo . xls " did not exist in the location specified . The value FALSE was returned to the pipeline . #> Function...

If a VM was in a VLAN, can an outside client make a RDP?

The idea behind a VLAN is isolation.  On the same Hyper-V Server, the two clients in question would have to connected to the same virtual network to communicate.  This defeats the purpose of this question.  I set up two different VMs on 2 different Hyper-V Servers.  Both were placed on external Virtual Networks and were able to PING each other.  On one of the virtual networks, I enabled VLAN with an ID of 2.  I also enabled it in the settings of the VM.  Once this change took effect, the two VMs lost communication with each other. In conclusion, the VLAN also isolates, as it should, communication between clients for both the virtual and physical worlds.  Therefore, no RDP traffic can pass between them.

If you transfer a user’s settings using USMT into a client that they already have a profile in, what will happen?

In the config.xml file, you can create merge rules for your data.  Below is an example of the xml code for a merge rule.  You can read the complete article from Microsoft here . <merge script>="MigXmlHelper.DestinationPriority()"> <objectSet> <pattern type="file">c:\data\* [*]<pattern> </objectSet> </merge> During ScanState, all the files will be added to the store. During LoadState, only C:\Data\SampleA.txt will be restored.     <merge script>="MigXmlHelper.SourcePriority()"> <objectSet> <pattern type="file">c:\data\* [*]<pattern> </objectSet> </merge> During ScanState, all the files will be added to the store. During LoadState, all the files will be restored (overwriting the existing files on the destination computer).     <merge script>="MigXmlHelper.SourcePriority()"> <objectSet> <pattern type="file">c:\da...

How do I know if DFS Replication is completed using PowerShell?

You can check the state of DFS-Replication by using the DFSRDiag command.  If replication was in progress, you would see these results dfsrdiag RepliationState Updates served: [1] Update name: user32.amx [2] Update name: gdi32.amx [3] Update name: report.docx [4] Update name: Train.pptx Total number of Outbound updates being served: 4 Summary Active inbound connections: 0 Updates Received: 0 Active outbound connections: 1 Updates sent out: 4 Operation Succeeded This must be ran on a server with DFS installed on it.  Your exact results will depend on what is being transferred. To do this in PowerShell, I created a function that sends a value of True into the pipeline if DFS replication is active and False if it is not.  Here is the code: <# . SYNOPSIS Test to determine if DFS replication is in progress . DESCRIPTION Returns [ Boolean ] TRUE if replication is in progress . Returns [ Boolean ] FALSE if replication is not in progre...

How to determine the number of physical processors on a client in PowerShell.

There seems to be a bit of a debate on the internet about this one.  I executed the following PowerShell command on 2 different computers: Get-WMIObject Win32_ComputerSystem | FL *   I executed it on a laptop with 1 physical processor with 4 logical processors and received the following results:     I then executed it again on a desktop with 1 physical processor and 8 logical processors:     From my testing, the NumberOfProcessors property seems to provide the correct number of physical processors.   I got curios and ran that PowerShell code on a virtual machine with 1 assigned processor:     I also ran it on a virtual machine with 4 processors assigned to it:     OK, so how do you know if you are looking at a virtual machine or a physical machine?  A couple of properties higher in the list you will see Model .  If this was a virtual machine, it would say Virtual Machine . ...

Use PowerShell to determine which groups a set of users have in common

From my PowerShell class in May, here is one of the problems a student wanted PowerShell to help with.  He needed a script that will let him feed in a list of user names and output which groups that all the users were members of.  Below is the code to do that.  Remember that you can Dot Source this into your shell or turn it into a module . <# . SYNOPSIS Takes a list of users and displays the groups that they have in common . . DESCRIPTION Utilizes Active Directory to take a list of users and enumerates all the groups that the users have in common . . PARAMETER UserList Comma delimited list of user names that are to be processed . . PARAMETER ListAll Displays not only the groups that all users are members of , but also the groups that at least one user is not a member of . . EXAMPLE compare - group g :\ userlist . txt | FT - AutoSize Name UserPresent ---- ----------- D...