Category Archives: Powershell

Testing the operating system

Saw a question about testing the operating system and decided that the easiest way was to use the Version property from Win32_OperatingSystem.  By easiest I mean least typing and string testing. $os = Get-WmiObject -Class Win32_OperatingSystem switch ($os.Version) {   {$_ … Continue reading

Posted in Powershell | Leave a comment

To install or not

My recent posts about the NTFSsecurity module drew a comment that the cmdlets in the module couldn’t be used because they’re not installed on every server. This raises the question  – to install or not. Windows systems have a huge … Continue reading

Posted in Powershell | Leave a comment

Get-NTFSAcess

Get-NTFSAcess and Get-NTFSEffectiveAccess are two cmdlets from the NTFSsecurity module. Get-NTFSAcess retrieves the access rights on a folder or file. You can immediately who has what rights and from where the rights are inherited. Get-NTFSEffectiveAccess by contrast shows the rights … Continue reading

Posted in Powershell | 1 Comment

Get-DiskSpace

The Get-DiskSpace cmdlet from the NTFSsecurity module is useful in that it gives ready calculated percentages of free and used space: AvailableFreeSpacePercent  : 56.73% AvailableFreeSpaceUnitSize : 270.11 GB ClusterSize                : 4096 DriveName                  : \\?\Volume{c1c4c5bb-0000-0000-0000-f01500000000}\ TotalSizeUnitSize          : 476.1 GB UsedSpacePercent           : … Continue reading

Posted in Powershell | 1 Comment

PowerShell Admin Modules

My PowerShell Admin Modules that used to be available through codeplex are now available on github – https://github.com/RichardSiddaway/PowerShell-Admin-Modules I haven’t updated them since their original publication but they’re still valid Enjoy

Posted in Powershell | Leave a comment

PowerShell articles

Here’s some links for other PowerShell articles I’ve written recently https://searchwindowsserver.techtarget.com/tip/PowerShell-commands-to-copy-files-Basic-to-advanced-methods https://searchwindowsserver.techtarget.com/tutorial/PowerShell-commands-for-Active-Directory-Groups-management https://searchwindowsserver.techtarget.com/tip/PowerShell-Core-61-offers-many-small-improvements https://searchwindowsserver.techtarget.com/tutorial/How-PowerShell-Direct-helps-polish-off-those-VMs https://searchwindowsserver.techtarget.com/tutorial/Working-with-PowerShell-module-downloads-from-the-gallery Enjoy

Posted in Powershell | Leave a comment

Change file times

When a file is created, accessed or modified that time is recorded. This is how to change file times. There are three properties to consider: CreationTime LastAccessTime LastWriteTime Just to add to the fun there are UTC (GMT in real … Continue reading

Posted in Powershell | 1 Comment