By David Wiseman (Administrator)Created 03 Feb 2008
My Rating:
Vote
Rating:
Not Rated
Views:5106
Downloads:35

List the Boot Configuration Properties of a Computer

Language:  PowerShell

Compatibility

Windows XP Yes Windows 2003 Yes
Windows 2000 No Windows NT No
Vista Yes Windows 2008 Yes
Description

Returns boot configuration information for a computer.

Code

Line Numbers: On  Off      Plain Text
$strComputer = "."

$colItems = get-wmiobject -class "Win32_BootConfiguration" -namespace "root\CIMV2" `
-computername $strComputer

foreach ($objItem in $colItems) {
      write-host "Boot Directory: " $objItem.BootDirectory
      write-host "Caption: " $objItem.Caption
      write-host "Configuration Path: " $objItem.ConfigurationPath
      write-host "Description: " $objItem.Description
      write-host "Last Drive: " $objItem.LastDrive
      write-host "Name: " $objItem.Name
      write-host "Scratch Directory: " $objItem.ScratchDirectory
      write-host "Setting ID: " $objItem.SettingID
      write-host "Temporary Directory: " $objItem.TempDirectory
      write-host
}

 


Got a useful script? Click here to upload!


 

  Post Comment
Order By:  
User Comments
      
Be the first to post a comment!