Category Archives: Powershell

File times

There are three pairs of file times that are available on files on Windows PS> Get-ChildItem -Path C:\test\Newoutdata01.txt | select *time* CreationTime      : 14/04/2019 17:28:41 CreationTimeUtc   : 14/04/2019 16:28:41 LastAccessTime    : 14/04/2019 17:28:41 LastAccessTimeUtc : 14/04/2019 16:28:41 LastWriteTime     : 25/02/2019 … Continue reading

Posted in File system, Powershell | Leave a comment

Get wireless networks

I saw a question on how to get wireless networks which got me thinking about string handling and working with legacy command line utilities. I also wanted to compare the options available in Windows PowerShell and PowerShell Core. First up … Continue reading

Posted in Powershell | Leave a comment

Brackets in file names

If you have brackets – [ or ] – in your file name you can see problems working with the file name. This is how to deal with brackets in file names. Consider the files: outdata01.txt out[data02.txt out]data03.txt out]d[ata04.txt which … Continue reading

Posted in Powershell | 1 Comment

Pro Microsoft Hyper-V 2019

I’ve always maintained that the most important thing about PowerShell is what you can do with it. This is brought out in my book – Pro Microsoft Hyper-V 2019 – https://www.apress.com/gb/book/9781484241158 . My co-author and I describe how to create … Continue reading

Posted in Hyper-V, Powershell | Leave a comment

Copy-Item

Copy-Item seems to cause problems for many users.  I’ve written an article on the use of Copy-Item that you may find useful – https://searchwindowsserver.techtarget.com/tip/PowerShell-commands-to-copy-files-Basic-to-advanced-methods

Posted in Powershell | Leave a comment

Read-Host

Read-Host enables you to prompt for input for your functions and scripts. For instance I see a lot of examples of this sort of code: $group = Read-Host -Prompt ‘Group Name’ Get-ADGroupMember -Identity $group You should only use Read-Host as … Continue reading

Posted in Powershell | Leave a comment

PowerShell interviews

Following my last post about sample questions for PowerShell interviews that I’d stumbled across I’ve been asked what sort of questions I’d ask – given my statement that many of the question sets were out of date. I’ve thought about … Continue reading

Posted in Powershell | Leave a comment