New-SMBMapping vs. New-PSDrive
This’ll be an expanding topic I suspect … New-SMBMapping (link) Seems to be the Microsoft’s preferred method. Mapped network drive may fail to reconnect in Windows 10, version 1809 -UseWriteThrough…
This’ll be an expanding topic I suspect … New-SMBMapping (link) Seems to be the Microsoft’s preferred method. Mapped network drive may fail to reconnect in Windows 10, version 1809 -UseWriteThrough…
For whatever reason, I ended up deleting some MP3 files from my music storage, and my iTunes Library still had (now "dead") links to the files. To find these dead…
was something I wrote about 8 years ago, in Detecting inactive computers in your AD domain. So it was time to update that*. Get-ADComputer -Filter * -Properties Name, LastLogonTimeStamp |…
I needed to ZIP-up some log files in a number of subdirectories. In the past, I have used the PKZIP utility.I couldn’t find my copy of PKZIP “Doesn’t PowerShell have…
Two lines of Powershell code: PS C:\> $osid=New-Object system.security.principal.securityidentifier("S-1-5-21-593069383-354653268-975305329-98179") PS C:\> Write-Host $osid.translate() Output is in the form of <DOMAIN>\<USERID> ie. NODDYLAND\admin-bike01 Reference: Microsoft: Well-known security identifiers in Windows operating…
Get-ADGroup "<GROUP NAME>" -Properties Member | Select-Object -ExpandProperty Member | Get-ADUSer -properties Displayname,Description,EmailAddress | Select Name,Displayname,Description,EmailAddresswill cause the following to displayName Displayname Description EmailAddress ---- ----------- ----------- ------------ fkjhsd Fred…
This is more of a link dump than anything else. I was asked what I thought of a WMI-related Group Policy change.I don’t much care for them.So I know that…
Get-ADUser -Filter * -Properties HomeDirectory,LastLogonDate | Select-Object Name, LastLogonDate, HomeDirectory will cause the following to display Name LastLogonDate HomeDirectory ---- --------------------- --------------- CollinsP 11/12/2015 6:04:12 AM \\wisefaq.com\HomeDrive\CollinsP SprouleK 19/12/2015 2:08:12…
So I need to get a list of print servers and printers in the domain. Using Powershell. Looking around the interwebs, I found a PowerShell commandline here which formed the…
By using PowerShell like this: Get-WmiObject -class Win32_PerfRawData_Tcpip_NetworkInterface -ComputerName Localhost | Format-Table Name,@{label="LinkSpeed(MB)";Expression={$_.CurrentBandwidth/1000000 -as }} which will return this: I first learnt how to do this by reading this blog…