Richard Siddaway's Blog
One thing you don’t hear much about is default parameters.
Get-CimInstance -ClassName Win32_LogicalDisk -Filter “DeviceId = ‘C:'”
A pretty standard use of CIM. … 190 more words
6 days, 21 hours ago
One thing I’ve been seeing come up a lot recently is the problem of modules and cmdlets cot being available when jobs and workflows are executed even though the module has been specifically loaded into PowerShell. 68 more words
1 week, 1 day ago
A question on the forum asking about filtering WMI results raises a number of interesting points.
The user wanted to pass a computername and a filter term to pull product information from remote machines. 156 more words
2 weeks ago
If you’re working with the WMI cmdlets and need to pass credentials you’ll end up with a statement something like this
Get-WmiObject -Class Win32_ComputerSystem -ComputerName $computer -Credential $cred… 323 more words
3 weeks, 1 day ago
As an alternative to the –contains operator you can use the –in operator
Repeating the tests from the previous post on –contains
PS> $primes = 1,3,5,7,11,13,17,19,23,29,31,37,41,43,47… 30 more words
1 month ago
Sometimes you may want to test if a value is in a collection of values
$primes = 1,3,5,7,11,13,17,19,23,29,31,37,41,43,47
if you want to test if 7 is a member of the collection… 10 more words
A question on the forum asked about testing if a remote machine could be reached before using Invoke-Command against it.
The usual way to test if you can reach a remote machine is to ping it… 133 more words