{"id":130,"date":"2017-10-30T20:48:09","date_gmt":"2017-10-31T01:48:09","guid":{"rendered":"http:\/\/sinjinsmith.net\/?p=130"},"modified":"2017-10-30T20:48:09","modified_gmt":"2017-10-31T01:48:09","slug":"powershell-tba","status":"publish","type":"post","link":"https:\/\/sinjinsmith.net\/?p=130","title":{"rendered":"PowerShell TBA"},"content":{"rendered":"<p>Connect to a remove server:<\/p>\n<p>Enter-PSSession {servername}<br \/>\n#prompt should change to name of server after logging in<\/p>\n<p>&nbsp;<\/p>\n<p>Create a network share:<\/p>\n<p>New-Item -Path E:\\Share1 -ItemType Directory<br \/>\nNew-SmbShare -Name Share1 -Path E:\\share1<br \/>\nGrant-SmbShareAccess -Name Share1 -AccountName CORP\\Joe.Smith -AccessRight Full -Confirm:$false<\/p>\n<p>&nbsp;<\/p>\n<p>===========================<br \/>\nBest Practice Analysis through PowerShell<\/p>\n<p>Get list of bpa models<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;<br \/>\nGet-BpaModel | Format-Table Id, Name, LastScanTime -AutoSiz<\/p>\n<p>Install BPA model<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\nget-bpamodel microsoft\/windows\/dnsserver<\/p>\n<p>Run BPA model<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;<br \/>\ninvoke-bpamodel microsoft\/windows\/dnsserver<\/p>\n<p>View BPA results<br \/>\n&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br \/>\nget-bparesult microsoft\/windows\/dnsserver<\/p>\n<p>&nbsp;<\/p>\n<p>&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Connect to a remove server: Enter-PSSession {servername} #prompt should change to name of server after logging in &nbsp; 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 &nbsp; =========================== Best Practice Analysis through PowerShell Get list of bpa models &#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211; Get-BpaModel | [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-130","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"https:\/\/sinjinsmith.net\/index.php?rest_route=\/wp\/v2\/posts\/130","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/sinjinsmith.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sinjinsmith.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sinjinsmith.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sinjinsmith.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=130"}],"version-history":[{"count":1,"href":"https:\/\/sinjinsmith.net\/index.php?rest_route=\/wp\/v2\/posts\/130\/revisions"}],"predecessor-version":[{"id":131,"href":"https:\/\/sinjinsmith.net\/index.php?rest_route=\/wp\/v2\/posts\/130\/revisions\/131"}],"wp:attachment":[{"href":"https:\/\/sinjinsmith.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=130"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sinjinsmith.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=130"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sinjinsmith.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=130"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}