Error » Microsoft Error! » Microsoft Operating Systems Error » Microsoft windows vista error » IT Forum Day One: Windows Vista and Windows PowerShell

Microsoft windows vista error all errors related to microsoft windows vista

Post New Thread Reply
  IT Forum Day One: Windows Vista and Windows PowerShell
LinkBack Thread Tools Display Modes
Old 08-Dec-2006, 11:06 PM   #1 (permalink)
Administrator
 
Anilrgowda's Avatar

Posts: 18,720
Join Date: Jan 2006
Rep Power: 10 Anilrgowda is on a distinguished road

IM:
Default IT Forum Day One: Windows Vista and Windows PowerShell

Today is Day 1 of the IT Forum conference in Barcelona, Spain. One of the big announcements in Bob Muglia's keynote this morning was the release of Windows PowerShell 1.0 today as a free download.
Windows PowerShell is Microsoft's new command-line shell and scripting language designed specifically to improve the manageability of Windows and products running on Windows such as Exchange Server 2007. If you haven't heard of Windows PowerShell before, think of it as an integrated version of the Windows Command Prompt (cmd.exe) and VBScript that is easy to use and will allow you to automate and control system administration tasks.
I asked the PowerShell team to put together some examples that show how PowerShell makes it easy for IT Pros to manage Windows Vista. Wow! I had no idea that PowerShell was this awesome. I think you will find that PowerShell will really jumpstart the productivity of a lot of IT pros as well power users who like to tweak their systems. To try any of the following tasks, you simply need to install Windows PowerShell on your Vista computer.
[FONT='Arial','sans-serif']12 Cool Features of Windows PowerShell
[/font]
By David Aiken, PowerShell Architect Evangelist and Jeffrey Snover, Windows PowerShell Architect. David Aiken has also recorded a video of these examples that you can view online on his Channel 9 DFO Show.
1. Built-in Cmdlets (pronounced "commandlets") for Managing Windows
All Cmdlets in Windows PowerShell follow a verb-noun syntax such as get-service, get-process, stop-service, get-wmiobject. Type get-command at the prompt to see the over 130 cmdlets provided by Windows PowerShell.
To get all services, type:
PS> get-service
2. The power of wildcards and working objects.
To get all services that start with "w" and then also get all dependent services associated with these services, simply type:
PS> get-service w* | format-list DisplayName, DependentServices
3. Whatif you could test your commands before committing to them.
Windows PowerShell has a unique feature called Whatif that will tell you the result of the command without executing the command.
The following command tells you which services starting with "w3" would be stopped. This utility is addictive once you start using it as it allows you to explore the features of PowerShell without causing any harm.
PS> stop-service w3* -whatif

4. Take a transcript
PowerShell allows you to start and stop transcripts of all your commands. This makes it easy to test commands and simultaneously save them for use in a script.
PS> Start-Transcript -Path c:\demo\dfoshow.txt
PS> Stop-Transcript
5. Make Windows talk from the command line.
Because Windows PowerShell is optimized to work with objects it is easy to access COM objects as well as the .NET framework from the command line. The commands below tell your Vista machine to pronounce the words "Windows Vista and PowerShell". Substitute your favorite phrase. Talk about easy command line access.
PS> $spVoice = new-object -com "SAPI.spvoice"
PS> $spVoice.Speak("Windows Vista and PowerShell")
6. Using Windows PowerShell to access applications such as Windows Media Player 11.
The following commands - which can easily be put in a script - will play a song by the band The Posies in Windows Media Player. This is a trivial example (see ScriptCenter for more WM11 examples) but demonstrates how Windows PowerShell provides comprehensive command line access to applications.
PS> $band = "The Posies"
PS> $player = New-object -com wmplayer.ocx
PS> $playlist = $player.mediacollection.getbyauthor($band)
PS> $player.openPlayer($playlist.item(0).sourceurl)
7. Windows PowerShell as a command line storage calculator
PowerShell allows you to complete basic calculations from the command line.
PS> 2*2
But PowerShell will also allow you to quickly solve storage problems. For instance, how many 700MB cds are needed to backup 11GB?
PS> 11gb/700mb
Or, how many terabytes (1000 GB) of storage is needed to backup 425 Vista desktops with 320gb storage each?
PS > (320gb*425)/1000GB
8. Using PowerShell as a calendar calculator
To find out how many days until the New Year, simply type:
PS> ([DateTime]"1/1/2007" -[datetime]::now).days

Using Windows PowerShell to manage Windows Vista: Files, WinSAT, UAC, and Bitlocker
If you are an IT Professional and you are evaluating new Windows Vista functionality, you should also evaluate Windows PowerShell. Here are some examples to get you started.
9. How many files of type X do I have on my machine?
Windows Vista has many new file types for event logs, group policy files, etc. .PS1 is the extension for Windows PowerShell scripts. Here is a command that will return the number of VBScript files, Bat files and PowerShell Scripts in a directory and its subdirectories.
PS> dir -include *.vbs, *.ps1, *.bat -recurse | group-object extension -noelement
10. Collecting Windows System Assessment Tool data from the command line.
The Windows System Assessment Tool (WSAT) provides numeric ratings (1= bad, 5=good) of system performance for processor, disk, graphics, etc so you can get a summary and potential solutions for improving performance. Because this data is stored in WMI, Windows PowerShell can programmatically collect this data from multiple computers and allow you to quickly evaluate the health of a set of machines without having to log in to each one. Here is a command to get WSAT data from a single Vista machine and format it in a nice, auto-sized table for viewing. Also an example of a PowerGadgets chart.
PS> get-wmiobject win32_winsat | format-table __SERVER, *SCORE -autosize
PS> get-wmiobject win32_winsat | select *score | out-chart -Title "System Assessment Scores by PowerGadgets"

11. Configuring User Account Control
Windows Vista's User Account Control (UAC) helps improve security by requiring that all programs run in standard user mode by default, rather than with administrator privileges. Some IT pros have asked if they can temporarily disable the prompts if they need to do a sequence of administrative tasks in a row. The following example can be used to temporarily disable the UAC prompt, and easily turn it back on. A value of 0 will turn off the Prompt Behavior of UAC on Vista. With a Value of 2, the UAC prompt will be turned back on.
PS> set-itemproperty -path HKLM:\SOFTWARE\MICROSOFT\WINDOWS\CurrentVersion\Po licies\System -name ConsentPromptBehaviorAdmin -value 0
12. Managing BitLocker with PowerShell
Vista's BitLocker feature helps prevents data loss via encryption. A thief who attempts to use another operating system or run a software hacking tool is prevented from overriding Windows Vista file and system protections or performing offline viewing of the files stored on the protected drive if BitLocker is installed. Here is how you can view, disable and enable BitLocker features from the Windows PowerShell prompt. (For this example, Windows BitLocker needs to be enabled on the c: drive.)
PS > $drives = get-wmiobject -namespace root\CIMv2\Security\MicrosoftVolumeEncryption -class Win32_EncryptableVolume
PS> $drives | format-table DriveLetter, PersistentVolumeID -autosize
PS> $BitLockDrive = $drives[0]
PS> $BitLockDrive.GetProtectionStatus()
PS> $BitLockDrive.DisableKeyProtectors()
PS> $BitLockDrive.EnableKeyProtectors()
One customer already using PowerShell is MySpace. It's been so useful for them that they are already using Windows PowerShell in their production environment to manage thousands of Windows Servers. Ad-hoc system administration tasks that used to take MySpace 10 minutes now take them only seconds.
A number of Microsoft partners have also provided Windows PowerShell-based tools designed specifically for Windows Vista. FullArmor announced Windows PowerShell cmdlets that improve the manageability of Group Policy on Vista. /n Software announced a beta of their free PowerShell-based network management tools. And PowerGadgets has built amazing charting and gauge utilities including gadgets that easily integrate with the Windows Vista Sidebar. These gadgets allow Windows Vista users and application developers to easily visualize system or application data - such as sales numbers or website performance -- and other line-of-business relevant data visualization needs.
This was a long post, but we were only able to scratch the surface of what PowerShell can do. For more comprehensive info see www.microsoft.com/powershell, the PowerShell team blog and the TechNet PowerShell ScriptCenter.
Anilrgowda is offline  
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!Spurl this Post!Reddit!
Reply With Quote
   


   
Post New Thread Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Windows PowerShell 2.0 Community Technology Preview (CTP) Spirit-X Application Downloads 0 22-Dec-2007 07:54 PM
Microsoft Windows PowerShell v1.0 Spirit-X Application Downloads 0 17-Aug-2007 03:57 AM
Windows vista PowerShell Anilrgowda Microsoft windows vista error 0 01-Feb-2007 07:12 AM
Do you Want an Unattended Windows XP forum ? tura OS tutorials 9 06-Sep-2006 03:17 AM
Do you Want an Unattended Windows XP forum ? tura Error Polling ! 14 17-Aug-2006 10:22 AM


All times are GMT -8. The time now is 07:32 PM.

Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.2.0

DMCA Policy

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228