List/Grid Tag Archives: tips
#PSTip Get all writeable properties of a WMI class
Not all WMI class properties can be modified. Many of these properties are read-only. Take a look at the properties and Win32_ComputerSystem, for example. Now, how do we retrieve properties…
#PSTip Optimizing WMI object retrieval
Whenever we use WMI cmdlets to query either local or remote machines, we need to keep the following points in mind: Don’t ever pipe the WMI objects to Where-Object cmdlet…
#PSTip Modifying WMI Object properties using Get-WmiObject cmdlet
Get-WmiObject and object modification! Sounds contradictory? Not really. That is the beauty of PowerShell and its object-based nature. Let us see an example to understand this. Now, setting the VolumeName…
#PSTip Adding extended types – the PowerShell 3.0 way!
PowerShell 3.0 introduced important changes to the Update-TypeData cmdlet which includes specifying the dynamic type data. Using these new features of Update-TypeData cmdlet, we can add extended types without using…
#PSTip How to get only files – the PowerShell 3.0 way!
The traditional or PowerShell 2.0 way of retrieving only files is: The new parameter -File of the Get-ChildItem cmdlet simplifies the filtering: Another way to achieve this in PowerShell 3.0…
