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

Conversion Plan (draft 0.1)

Overview There shall be three phases of this project to ensure minimal disruption to production…

How to Use QRadar to Search for a Windows Account Activities

Log into https://qradar/console/qradar/jsp/QRadar.jsp Log Activity > Add Filter > Parameter=Username[Indexed] | Operator=Equals any of |…

PowerShell: Invoke Backup SQL Database

Function to invoke SQL Backups on a Remote SQL Server: # invokeSqlBackup.ps1 # Version 0.0.1…
Other project: DragonCoin.com