Author Archives: richardsiddaway

Unblock and rename files

I have a bunch of files that I’ve downloaded to a specific folder. I need to unblock and rename files in that folder. The rename involves replacing a plus sign with a space. $path = ‘C:\Users\Richard\Downloads\Walks’ $files = Get-ChildItem -Path … Continue reading

Posted in Powershell | Leave a comment

Change a computer’s description

The Win32_OperatingSystem class exposes the machines Description. This is how you can easily change a computer’s description. PS> Get-CimInstance -ClassName Win32_OperatingSystem | select Description Description ———– PS> Get-CimInstance -ClassName Win32_OperatingSystem | Set-CimInstance -Property @{Description = ‘Richards Laptop’} PS> Get-CimInstance -ClassName … Continue reading

Posted in PowerShell and CIM | Leave a comment

Control split output

In this post I’ll show you show to control split output – that is control the number of strings that are returned. If you use –split with just a delimiter you’ll get a split occurring at every occurrence of the … Continue reading

Posted in Powershell | Leave a comment

More diskinfo

Yesterday I showed how to get the disk, partition and logical disk information using CIM. Today I want to show more diskinfo techniques. This time we’ll use the Storage module which was introduced with Windows 8. Underneath the covers it … Continue reading

Posted in PowerShell and CIM, Storage | Leave a comment

Linking disks, partitions and logical drives

A question of the forums was asking about discovering disk information. They were trying to pipe the output of Get-WmiObject into another Get-WmiObject. that won’t work. There is another way. On Windows machines physical drives are divided into 1 or … Continue reading

Posted in PowerShell and CIM, PowerShell and WMI, Storage | Leave a comment

Office holidays

Office holidays are a great thing. They usually occur on public holidays. There’s a web site – http://www.officeholidays.com – you can use to discover the public holidays in your country. 133 countries are available – http://www.officeholidays.com/countries/index.php. You can also use … Continue reading

Posted in Powershell | Leave a comment

Variable as a where clause

A post on the forum about using a variable as a where clause looked interesting. What the user wanted to do was to define a variable that contained the filter to be used by Where-Object. As an example consider filtering … Continue reading

Posted in Powershell | Leave a comment