Archives

All posts for the month October, 2017

Connect to a remove server:

Enter-PSSession {servername}
#prompt should change to name of server after logging in

 

Create a network share:

New-Item -Path E:\Share1 -ItemType Directory
New-SmbShare -Name Share1 -Path E:\share1
Grant-SmbShareAccess -Name Share1 -AccountName CORP\Joe.Smith -AccessRight Full -Confirm:$false

 

===========================
Best Practice Analysis through PowerShell

Get list of bpa models
——————————–
Get-BpaModel | Format-Table Id, Name, LastScanTime -AutoSiz

Install BPA model
——————————
get-bpamodel microsoft/windows/dnsserver

Run BPA model
———————
invoke-bpamodel microsoft/windows/dnsserver

View BPA results
—————————-
get-bparesult microsoft/windows/dnsserver