Are you using VBScript, CMD or BAT? Are you using the old Command line using cmd.exe? Then Windows PowerShell is worth looking at. Windows PowerShell™ is a new Windows command-line shell.
Take a look at the VBScript to Windows PowerShell Conversion Guide. See Windows PowerShell Team blog and download from the homepage for Windows PowerShell.
You can run Windows command-line programs and start Windows graphic programs in Windows PowerShell. In Windows PowerShell, script files have a .ps1 file name extension.
Support for Tab-Completion. Start with for example get- and press tab several times and find cndket's like Get-Acl, Get-Alias, etc.
Windows PowerShell is built on top of the .NET common language runtime (CLR) and the .NET Framework, and accepts and returns .NET objects and you work with methods and properties.
Windows PowerShell has syntax features and keywords that are very similar to those used in the C# programming language.
A cmdlet (pronounced "command-let") is a single-feature command that manipulates objects in Windows PowerShell. You can recognize cmdlets by their name format -- a verb and noun separated by a dash (-), such as Get-Help, Get-Process, and Start-Service.
Windows Management Instrumentation (WMI) is supported with the cmdlet for accessing WMI objects, Get-WmiObject and is one of the most powerful ones.
You can reference COM objects like WScript.Shell.
$WshShell = New-Object -ComObject WScript.Shell
You can use the Win32_Product class to install Windows Installer packages, remotely or locally.
In addition to the familiar file system drives, such as C: and D:, Windows PowerShell includes drives that represent the HKEY_LOCAL_MACHINE (HKLM:) and HKEY_CURRENT_USER (HKCU:) registry hives.
No comments:
Post a Comment