-
Notifications
You must be signed in to change notification settings - Fork 36
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
added enable_os_share_windows.ps1 script to windows ci
- Loading branch information
1 parent
a6dc353
commit 6117ab9
Showing
4 changed files
with
24 additions
and
2 deletions.
There are no files selected for viewing
This file contains 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
File renamed without changes.
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
#Requires -RunAsAdministrator | ||
|
||
$ErrorActionPreference = 'Stop' | ||
|
||
# script to overcome all weird windows vm settings on azure | ||
|
||
# disable all password requirements (length, complexity, etc) | ||
# needed to allow for creation of new account smbuser:smbuser | ||
secedit /export /cfg c:\secpol.cfg | ||
(gc C:\secpol.cfg).replace("PasswordComplexity = 1", "PasswordComplexity = 0") | Out-File C:\secpol.cfg | ||
secedit /configure /db c:\windows\security\local.sdb /cfg c:\secpol.cfg /areas SECURITYPOLICY | ||
rm -force c:\secpol.cfg -confirm:$false | ||
|
||
# turn on file sharing | ||
netsh advfirewall firewall set rule group="File and Printer Sharing" new enable=Yes |
File renamed without changes.