programming4us
         
 
 
Windows

Windows 7 : Scripting Windows with PowerShell - Running PowerShell Cmdlets

- Windows 10 Product Activation Keys Free 2019 (All Versions)
- How To Bypass Torrent Connection Blocking By Your ISP
- How To Install Actual Facebook App On Kindle Fire
5/4/2011 6:22:21 PM
PowerShell 2.0 is positively bursting at the seams with well over 200 cmdlets. However, the fact is that most of those cmdlets are quite obscure and are unlikely to be of interest to most of us. So, my goal in this section is to introduce you to a few cmdlets that are useful or interesting, so not only can you can use them to learn how PowerShell works, but I hope you’ll also make use of these techniques to help you control and tweak Windows 7.

Before getting to all that, it might help to get an overview of all the PowerShell cmdlets. To that end, Table 1 presents a complete list of the 236 cmdlets, organized by category.  You can view the Help text for any command by entering a command at the PowerShell prompt using the following syntax:

get-help cmdlet [-detailed | -examples | -full]

Table 1. PowerShell’s Cmdlets, Organized by Category
Aliases  
Get-AliasImport-AliasSet-Alias
Export-AliasNew-Alias 
Content  
Add-ContentGet-Content 
Clear-ContentSet-Content 
Debugging  
Debug-ProcessGet-TraceSourceSet-StrictMode
Disable-PSBreakpointRemove-PSBreakpointWrite-Debug
Enable-PSBreakpointSet-PSBreakpointWrite-Error
Get-PSBreakpointSet-PSDebug 
Drives  
Get-PSDriveNew-PSDrive 
Get-PSProviderRemove-PSDrive 
Events  
Clear-EventLogNew-EventSet-TraceSource
Get-EventNew-EventLogShow-EventLog
Get-EventLogRegister-EngineEventTrace-Command
Get-EventSubscriberRegister-ObjectEventUnregister-Event
Get-WinEventRemove-EventWait-Event
Limit-EventLogRemove-EventLogWrite-EventLog
Executing  
Get-JobMeasure-CommandStart-Job
Invoke-CommandReceive-JobStop-Job
Invoke-ExpressionRemove-JobWait-Job
Export/Import  
Export-ClixmlExport-CsvImport-Counter
Export-CounterImport-ClixmlImport-Csv
Formats  
ConvertFrom-CsvConvertTo-HtmlFormat-List
ConvertFrom-SecureStringConvertTo-SecureStringFormat-Table
ConvertFrom-StringDataConvertTo-XmlFormat-Wide
ConvertTo-CsvFormat-Custom 
Items  
Clear-ItemGet-ItemPropertyRemove-ItemProperty
Clear-ItemPropertyInvoke-ItemRename-Item
Copy-ItemMove-ItemRename-ItemProperty
Copy-ItemPropertyMove-ItemPropertySet-Acl
Get-AclNew-ItemSet-Item
Get-ChildItemNew-ItemPropertySet-ItemProperty
Get-ItemRemove-Item 
Management  
Connect-WSManGet-WSManInstanceSet-WSManInstance
Disable-WSManCredSSPInvoke-WSManActionSet-WSManQuickConfig
Disconnect-WSManNew-WSManInstanceTest-WSMan
Enable-WSManCredSSPNew-WSManSessionOption 
Get-WSManCredSSPRemove-WSManInstance 
Miscellaneous  
Get-DateRead-HostSend-MailMessage
Import-LocalizedDataSelect-StringSet-Date
New-TimeSpanSelect-Xml 
Operating System  
Add-ComputerNew-ServiceStart-Process
Checkpoint-ComputerNew-WebServiceProxyStart-Service
Disable-ComputerRestoreRemove-ComputerStart-Sleep
Enable-ComputerRestoreReset-ComputerMachinePasswordStop-Computer
Get-ComputerRestorePointRestart-ComputerStop-Process
Get-CounterRestart-ServiceStop-Service
Get-HotFixRestore-ComputerSuspend-Service
Get-ProcessResume-ServiceTest-Connection
Get-ServiceSet-ServiceWait-Process
Objects  
Add-MemberGroup-ObjectTee-Object
Compare-ObjectMeasure-ObjectUpdate-List
ForEach-ObjectNew-ObjectWhere-Object
Get-MemberSelect-Object 
Get-RandomSort-Object 
Output  
Out-DefaultOut-NullWrite-Output
Out-FileOut-PrinterWrite-Progress
Out-GridViewOut-StringWrite-Verbose
Out-HostWrite-HostWrite-Warning
Paths  
Convert-PathPop-LocationSet-Location
Get-LocationPush-LocationSplit-Path
Join-PathResolve-PathTest-Path
PowerShell System  
Get-CommandGet-HelpGet-UICulture
Get-CultureGet-Host 
PowerShell Session  
Add-HistoryGet-ExecutionPolicyNew-PSSession
Add-PSSnapinGet-FormatDataNew-PSSessionOption
Add-TypeGet-HistoryRegister-PSSessionConfiguration
Clear-HistoryGet-ModuleRemove-Module
Disable-PSSessionConfigurationGet-PSCallStackRemove-PSSession
Enable-PSRemotingGet-PSSessionRemove-PSSnapin
Enable-PSRemotingGet-PSSessionRemove-PSSnapin
Enable-PSSessionConfigurationGet-PSSessionConfigurationSet-PSSessionConfiguration
Enable-PSSessionConfigurationGet-PSSessionConfigurationSet-PSSessionConfiguration
Enter-PSSessionGet-PSSnapinStart-Transcript
Exit-PSSessionImport-ModuleStop-Transcript
Export-ConsoleImport-PSSessionTest-ModuleManifest
Export-PSSessionNew-ModuleManifest 
Security  
Get-AuthenticodeSignatureGet-PfxCertificateSet-ExecutionPolicy
Get-CredentialSet-AuthenticodeSignatureTest-ComputerSecureChannel
Transactions  
Complete-TransactionStart-TransactionUse-Transaction
Get-TransactionUndo-Transaction 
Variables  
Clear-VariableNew-VariableSet-Variable
Get-VariableRemove-VariableUpdate-TypeData
WMI  
Invoke-WmiMethodRemove-WmiObject 

Here, replace cmdlet with the name of the cmdlet you want to investigate. Add the -detailed switch to get extra-geeky data about the cmdlet, or add the -examples switch to see how you use the cmdlet in action; if you want both, add the -full switch, instead.

 

Tip

In Table 1, you’ll see lots of cmdlets that use the verb Get (such as Get-Alias and Get-Content). Get is PowerShell’s default verb, so you can save a bit of time and typing by leaving off the get- part when entering commands. For example, the following two commands are identical:

get-alias
alias
Other -----------------
- Windows 7 : Scripting Windows with PowerShell - Getting Started with PowerShell
- Scripting Windows 7 with WSH : Programming the Windows Management Instrumentation Service
- Scripting Windows 7 with WSH : Scripting Internet Explorer
- Scripting Windows 7 with WSH : Programming the WshNetwork Object
- Scripting Windows 7 with WSH : Programming the WshShell Object (part 2)
- Scripting Windows 7 with WSH : Programming the WshShell Object (part 1)
- Scripting Windows 7 with WSH : Programming the WScript Object
- Scripting Windows 7 with WSH : Programming Objects
- Scripting Windows 7 with WSH : Scripts and Script Execution
- Adding Macs to Your Windows 7 Network : Letting Windows Computers See Your Mac Shares
- Adding Macs to Your Windows 7 Network : Using a Mac to Make a Remote Desktop Connection to Windows 7
- Adding Macs to Your Windows 7 Network : Connecting to a Windows Shared Folder
- Adding Macs to Your Windows 7 Network : Connecting to the Windows Network
- Windows 7 : Controlling and Customizing Your Website (part 5) - Viewing the Server Logs
- Windows 7 : Controlling and Customizing Your Website (part 4) - Disabling Anonymous Access
- Windows 7 : Controlling and Customizing Your Website (part 3) - Working Without a Default Document
- Windows 7 : Controlling and Customizing Your Website (part 2) - Setting the Website’s Default Document
- Windows 7 : Controlling and Customizing Your Website (part 1)
- Windows 7 : Adding Folders and Files to the Default Website (part 3) - Adding a Folder to the Default Website
- Windows 7 : Adding Folders and Files to the Default Website (part 2) - Changing the Default Website Home Page
 
 
 
Top 10
 
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 2) - Wireframes,Legends
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Finding containers and lists in Visio (part 1) - Swimlanes
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Formatting and sizing lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Adding shapes to lists
- Microsoft Visio 2013 : Adding Structure to Your Diagrams - Sizing containers
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 3) - The Other Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 2) - The Data Properties of a Control
- Microsoft Access 2010 : Control Properties and Why to Use Them (part 1) - The Format Properties of a Control
- Microsoft Access 2010 : Form Properties and Why Should You Use Them - Working with the Properties Window
- Microsoft Visio 2013 : Using the Organization Chart Wizard with new data
- First look: Apple Watch

- 3 Tips for Maintaining Your Cell Phone Battery (part 1)

- 3 Tips for Maintaining Your Cell Phone Battery (part 2)
programming4us programming4us
Video Tutorail Microsoft Access Microsoft Excel Microsoft OneNote Microsoft PowerPoint Microsoft Project Microsoft Visio Microsoft Word Active Directory Biztalk Exchange Server Microsoft LynC Server Microsoft Dynamic Sharepoint Sql Server Windows Server 2008 Windows Server 2012 Windows 7 Windows 8 Adobe Indesign Adobe Flash Professional Dreamweaver Adobe Illustrator Adobe After Effects Adobe Photoshop Adobe Fireworks Adobe Flash Catalyst Corel Painter X CorelDRAW X5 CorelDraw 10 QuarkXPress 8 windows Phone 7 windows Phone 8 BlackBerry Android Ipad Iphone iOS