TONYSO

Tonyso Credo: "Look for a pattern, and solve it for everything"

Browse by Tags

Related Posts
  • Blog Post: How to Tell if you are in a VM Using Script

    Sometimes you need to identify if something is running inside a virtual machine before you take action. This sample VBScript uses the same logic found in the Microsoft Deployment Toolkit to show if a deployment is running in a VM. If IsVM Then     WScript.Quit 1 Else    ...
  • Blog Post: Hyper-V How To: Set a Custom KVP using Script

    Some friends here on the Hyper-V team shared a PowerShell 2.0 script for setting custom KVPs: # Set a Custom KVP param( [string]$vmName = $(throw "Must specify virtual machine name"), [string]$Key = $(throw "Must specify a key"), [string]$Value = $(throw "Must specify a value") ) $vm = gwmi...
  • Blog Post: Hyper-V How To: Create a VM using Script

    Some friends here on the Hyper-V team shared a PowerShell 2.0 script for creating a VM: # Create a VM param( [string]$vmName = $(throw "Must supply a virtual machine name") ) # Get a new instance of Msvm_VirtualSystemGlobalSettingData $vsgsdClass = [wmiclass]"root\virtualization:Msvm_VirtualSystemGlobalSettingData...
  • Blog Post: New SuperFlow for Troubleshooting Forefront TMG Installation

    SuperFlows are new content types for Microsoft, here’s a new one for troubleshooting TMG installs . In a SuperfFlow, we can filter information to that is it more relevant. For example, in a branching tree, we can show you just the procedures that apply to your resultant set of choices. Check it out and...
  • Blog Post: Hyper-V How To: Manually Configure Hyper-V Pagefile

    Hyper-V automatically configures your pagefile settings, but if, for some troubleshooting purposes, you may want to change them manually. Here's how: 1. To check current pagefile stats, from the command line type: wmic pagefile get /format:list 2. To disable automatic system pagefile management, from...
  • Blog Post: Hyper-V How-To: Convert VM Memory Contents to a Dump File

    Released today for free-as-in-beer on MSDN Code Gallery: Microsoft Hyper-V VM State to Memory Dump Converter Check out this great troubleshooting tool. Did I mention it is free?
  • Blog Post: Hyper-V How To: Connect Virtual Switch to Host using Script

    Some friends here on the Hyper-V team shared a PowerShell 2.0 script for connecting your virtual switches to the management partition (parent partition): # Connect a Virtual Switch to the management partition param( [string]$vsName = $(throw "Must specify virtual switch name"), [string]$intEthName...
  • Blog Post: Hyper-V How To: Modify VLAN Settings using Script

    Some friends here on the Hyper-V team shared a PowerShell 2.0 script for modifying hte VLAN settings on your VMs: # Modify VLAN setting for VM param( $vmName = $(throw "Must supply a virtual machine name"), $vlanId = $(throw "Must supply vlan id"), $computer = "." ) $ns = "root\virtualization...
  • Blog Post: Hyper-V How To: Get Intrinsic KVPS using Script

    Some friends here on the Hyper-V team shared a PowerShell 2.0 script for getting an intrinsic KVPS: # Get Intrinsic KVPs (Included Guest machine name, IC Version, OS Version, etc) param( [string]$vmName = $(throw "Must specify virtual machine name") ) $vm = gwmi -namespace root\virtualization...
  • Blog Post: Hyper-V How To: Create a Fixed VHD using Script

    Some friends here on the Hyper-V team shared a PowerShell 2.0 script for creating a fixed VHD for your VM: # Create fixed VHD param( [string]$vhdPath = $(throw "Must specify full path for new VHD"), [string]$vhdSize = $(throw "Must specify size for new VHD (in GB)") ) # Size in bytes $GB...
  • Blog Post: Hyper-V How To: Plan and Deploy Virtualization

    Tools and instruction that will help you plan deploy Hyper-V: Microsoft IT Insight Workshop on Virtualization. Fee-based offering delivered in collaboration between Microsoft IT and Microsoft Services, offers key insights into Microsoft IT’s virtualization efforts and how Microsoft IT plans and...
  • Blog Post: Hyper-V How To: Script AzMan Scopes for RBAC

    In the scripting forum someone :-) asked: "Can anyone suggest the way to create AzMan scopes for VMs (I can assign VMs to scopes) with Powershell/WMI/VBScript?" 4 scripts are provided for managing your AzMan scopes in Hyper-V : CreateVMInScope DisplayVMScopes ClearVMScopes ChangeVMScope Enjoy!
  • Blog Post: Hyper-V How To: Convert a VHD using Script

    Some friends here on the Hyper-V team shared a PowerShell 2.0 script for converting your VHDs: # Convert a VHD param( [string]$vhdPath = $(throw "Must specify full VHD path, including extension"), [string]$destPath = $(throw "Must specify full path of destination VHD, including extension"),...
  • Blog Post: Hyper-V How To: Detect if you are inside a VM

    Sometimes, when troubleshooting or for forensic reasons, you may have to determine if an application is running inside a virtual machine. John Kelbley, co-author of Windows Server 2008 Hyper-V : Insiders Guide to Microsoft's Hypervisor , shares how. One (relatively) simple way to detect key virtualization...
  • Blog Post: Hyper-V How To: Check Hypervisor Heartbeat using Script

    Some friends here on the Hyper-V team shared a PowerShell 2.0 script for checking in the hypervisor is running on a Hyper-V server (host/parent partition): # Check if Hypervisor is running $hypervisor = gwmi –ErrorAction SilentlyContinue Win32_PerfRawData_HvStats_HyperVHypervisor return $hypervisor...
  • Blog Post: New Forum for IT Pro Version of CodeGallery

    Add your voice in the new forum for the upcoming IT Pro version of Code Gallery . What would you like to see in the IT Pro version of Code Gallery? What would you NOT like to see? Is it as simple as "PowerShell"? Or is the answer more complicated? Let's discuss here .
  • Blog Post: Hyper-V How To: Loopback Mount a VHD using Script

    Some friends here on the Hyper-V team shared a PowerShell 2.0 script for loopback mounting a VHD, for example, if you need to use bcdedit to alter the boot configuration store offline: # Loopback mount a VHD param( [string] $path = $(throw "Must supply a path"), [string] $computer = "." ) ...
  • Blog Post: Hyper-V How To: Manage Hyper-V with PowerShell

    James has published a New and improved PowerShell Library for Hyper-V . Now with more functions and... documentation! Look for Pshyperv.pdf and send thanks to James. Did I mention it is free-as-in-beer?  
  • Blog Post: Hyper-V How To: Create a Virtual Switch using Script

    Some friends here on the Hyper-V team shared a PowerShell 2.0 script for creating a virtual switch: # Create a Virtual Switch param( [string]$vsName = $(throw "Must specify virtual switch name") ) # Get the Virtual Switch Management Service $vsms = gwmi -namespace root\virtualization Msvm_VirtualSwitchManagementService...
  • Blog Post: Hyper-V Cmdlets in Windows Server 8 Demo Video

    Hyper-V PM Eric Bahna recently recorded a video demo of the new Hyper-V Windows PowerShell cmdlets in Windows Server "8* Beta . The complete demo is about 21 minutes long. Windows Server 8 Hyper-V PowerShell Demo Uncut For convenience, I also made three shorter versions currently available...
  • Blog Post: Hyper-V How To: Add a PT Disk to A VM with a Script

    Some friends here on the Hyper-V team shared a PowerShell 2.0 script for adding a pass-through disk to a VM: # Add a pass-through disk to a VM param( [string]$vmName = $(throw "Must specify virtual machine name"), [int]$ideNum = $(throw "Must specify IDE location to attach the pass-through disk...
  • Blog Post: Hyper-V How To: Connect a Virtual Switch to a VM using Script

    Some friends here on the Hyper-V team shared a PowerShell 2.0 script for connecting a virtual switch to a VM: # Connect Virtual Switch to VM param( [string]$vsName = $(throw "Must specify virtual switch name"), [string]$vmName = $(throw "Must specify virtual machine name"), [string]$switchPortName...
  • Blog Post: IT Insider Hyper-V Information

    Check out the Insider’s Guide to Microsoft’s Hyper-V. Truth in advertising for once, you can’t get a whole lot more *insider* than these guys,  and the book includes much PowerShell goodness. Hyper-V + PowerShell = Salty Goodness. Ex. see the free-as-in-beer PowerShell Library for Hyper-V Management...
  • Blog Post: Hyper-V How To: Expand a VHD

    Some friends here on the Hyper-V team shared a PowerShell 2.0 script for expanding VHD: # Expand a VHD param( [string]$vhdPath = $(throw "Must specify full path for VHD"), [string]$vhdSize = $(throw "Must specify expansion to add to VHD (in MB)") ) # Size in bytes $MB = [System.UInt64] $vhdSize...
  • Blog Post: Power to the People

    If you read this blog, you know about the TechNet Wiki I helped start a while ago. The wiki represents many kinds of awesome. The best of which is the people who care enough about technology, and the wiki, to contribute content. The wiki has been nominated for an internal Microsoft Engineering Excellence...