To check the shared and unshared folder history on a Windows Server (including Windows Server 2022), you can use the following PowerShell commands:
- To view the shared folder history:
Get-SmbShare | Select-Object Name, CreationTime, LastWriteTime, Status
- To view the unshared folder history:
Get-ChildItem -Path HKLM:\SYSTEM\CurrentControlSet\Services\LanmanServer\Shares -Recurse | Select-Object Name, @{Name="CreationTime";Expression={$_.CreationTime}}, @{Name="LastWriteTime";Expression={$_.LastWriteTime}}, @{Name="Status";Expression={$_.GetValue("State")}}
These commands will provide you with the name, creation time, last write time, and status of shared and unshared folders on the Windows Server.
Note: Ensure that you have the necessary permissions to run these commands.
References:
Summary:
To check the shared and unshared folder history on a Windows Server, including Windows Server 2022, you can use PowerShell commands such as Get-SmbShare and Get-ChildItem. These commands will provide you with the name, creation time, last write time, and status of shared and unshared folders on the Windows Server. Ensure that you have the necessary permissions to run these commands.
References: