Showing results for February 2021 - PowerShell Community

Feb 26, 2021
Post comments count1
Post likes count1

Getting Yesterday’s Date

@DoctorDNS
@DoctorDNS

Q: How can I get yesterday's date? A: You can use a combination of the cmdlet and .NET Time/Date methods. First, let's look at dates in PowerShell and .NET Then we can look at how to calculate yesterday and use that in your scripts. Dates in PowerShell Let's start by looking at how you can deal with dates and times. As you probably know, Power...

Scripting Guys Update.NET
Feb 23, 2021
Post comments count7
Post likes count0

Using Get-Service in PowerShell 7 vs. Windows PowerShell 5.1

Faris Malaeb
Faris Malaeb

Q: How can I get the Username, and StartType for a Windows Service? A: Quick answer is PowerShell 7. Microsoft is doing a great job on PowerShell with each version they release. The simple answer to this question is a command called . But there is a big update that makes getting the required information much easier with PowerShell 7. I will show ...

Feb 19, 2021
Post comments count8
Post likes count0

Changing Drive Letters and Labels via PowerShell

@DoctorDNS
@DoctorDNS

Q: I want to change the drive letter and the drive label for a new USB drive. Is there a way with PowerShell? A: Of course. One way is to use WMI and the CIM cmdlets. PowerShell does not have a cmdlet to change the drive letter or the caption directly. But the good news is that you can use WMI and the CIM cmdlets to change both the drive letter a...

Scripting Guys Update
Feb 16, 2021
Post comments count12
Post likes count1

Announcing the PowerShell Community Blog

Doctor Scripto
Doctor Scripto

We are proud to announce a new blog dedicated to PowerShell and focused on the community. This is a blog by the community and for the community. And we have made it easier than ever for you to contribute to the new blog.

Blog newsAnnouncement