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

How To Add or Remove a Path in Windows Environmental Paths

There are 2 functions to Add and Remove, at your convenience: # addEnvironmentalPath.ps1 $pathToAdd='C:\Scripts' $pathToRemove='C:\Scripts'…

Maximum Ram for Windows 32 bit

Enable 4GB RAM Usage for Windows XP Right-click "My Computer" >> Properties >> Advanced >>…

Dial Plans Decoded

() parenthesis enclose the dial plan | pipe means OR x represents a digit between…