Posted On January 6, 2023

Windows: How to Map Network Drive for All Users of a Local Machine

kimconnect 0 comments
blog.KimConnect.com >> Codes , Windows >> Windows: How to Map Network Drive for All Users of a Local Machine
# Mapping file share using legacy commands (more effective than newer PowerShell equivalents in certain scenarios)
$textContent=@'
net use m: /delete
net use m: \\FILESERVER\SHARENAME
'@
Set-Content "$env:ProgramData\Microsoft\Windows\Start Menu\Programs\StartUp\mountShares.bat" $textContent

Leave a Reply

Your email address will not be published. Required fields are marked *

Related Post

LDAP Ubuntu Client Setup

Install the client application: sudo apt-get update sudo apt-get -y install libnss-ldapd libpam-ldapd ldap-utils nscd…

Recovering Hard Drive Corrupted Files

Method 1: use TestDisk (very effective in recovering JPEG and partial files) Download https://www.cgsecurity.org/wiki/TestDisk_Download >…

Active Directory GPO Practical Examples

Fonts Distribution---------------------------------A. Create an SMB share on an Intranet accessible directory \\SOFTWARE\FONTS\Kim-Connect.ttfB. Create a new…