This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # source: https://blogs.technet.microsoft.com/heyscriptingguy/2012/10/28/powertip-use-powershell-to-enable-the-windows-firewall/ | |
| # older Wins: netsh advfirewall set allprofiles state off | |
| Set-NetFirewallProfile -Profile Domain,Public,Private -Enabled False |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # @source => http://blogs.msdn.com/b/virtual_pc_guy/archive/2010/09/23/a-self-elevating-powershell-script.aspx | |
| # Get the ID and security principal of the current user account | |
| $myWindowsID=[System.Security.Principal.WindowsIdentity]::GetCurrent() | |
| $myWindowsPrincipal=new-object System.Security.Principal.WindowsPrincipal($myWindowsID) | |
| # Get the security principal for the Administrator role |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $root = "\\VBOXSRV\" | |
| $folders = "common", "vagrant" | |
| $nCOM = New-Object -ComObject WScript.Shell | |
| $folders | ForEach-Object { | |
| $shortcut = $nCOM.CreateShortcut("$Home\Desktop\" + $_ + " (VBOXSRV).lnk") | |
| $shortcut.TargetPath = $root + $_ | |
| $shortcut.Save() | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| DISM /online /Set-Edition:ServerStandard /ProductKey:XXXXX-XXXXX-XXXXX-XXXXX-XXXXX /AcceptEula |
NewerOlder