Skip to content

Instantly share code, notes, and snippets.

@PixelRobots

PixelRobots/Nano_SMB.ps1

Last active Apr 21, 2017
Embed
What would you like to do?
Enter-PSSession -ComputerName PIXEL-NANO10
Install-NanoServerPackage Microsoft-NanoServer-Storage-Package -Culture en-us
shutdown /r /t 10
Exit-PSSession
Enter-PSSession -ComputerName PIXEL-NANO10
New-Item -Name Share -Path c:\ -Type directory
New-SmbShare -Name share -Path c:\Share
Get-SMBShareAccess share
Grant-SmbShareAccess -Name share -AccountName ad.testpixels.co.uk\richard.hooper -AccessRight change
revoke-SmbShareAccess -Name share -AccountName everyone
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment