So after a good 8 month wait, here are the results! Previous Post: http://controllingtheinter.net/2018/06/18/waiting-on-results-from-appeal/
Category Archives: Uncategorized
Getting 3TX and 1 RX out of a Wemos D1 Mini Pro and the NONOS-SDK
So last night, I wanted to see if I could create three TX’s out of the Wemos D1. I was able to accomplish this using the TX/RX swapped to D7/D8, Pin D4 for UART1_TX_BK and USB-COM using TX (After swap is RTS / GPIO1). and Voila! Done. Something to note, With this change I then …
Continue reading “Getting 3TX and 1 RX out of a Wemos D1 Mini Pro and the NONOS-SDK”
Pushing Powershell remotely with DSC
Using the following code I was able to push Firewall settings to multiple machines.
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 |
#https://gallery.technet.microsoft.com/scriptcenter/xNetworking-Module-818b3583 Configuration ScriptTest { param ( [string[]] $NodeName = 'Localhost' ) Import-DscResource –ModuleName 'PSDesiredStateConfiguration' Node $NodeName { Script EnableFirewall { # Must return a hashtable with at least one key # named 'Result' of type String GetScript = { Return @{ Result = [string]$(netsh advfirewall show allprofiles) } } # Must return a boolean: $true or $false TestScript = { If ((netsh advfirewall show allprofiles) -like "State*off*") { Write-Verbose "One or more firewall profiles are off" Return $false } Else { Write-Verbose "All firewall profiles are on" Return $false #return false as well to always run the SetScript on the remote server } } # Returns nothing SetScript = { Write-Verbose "Setting all firewall profiles to on" #netsh advfirewall set allprofiles state on Remove-NetFirewallRule -All } } } } } Configuration DSCFirewallRule { param ( [string[]] $NodeName = 'Localhost' ) Import-DSCResource -ModuleName xNetworking Node $NodeName { xFirewall Firewall1 { Access = 'Block' Name = 'NotePadFirewallRule' DisplayName = 'Firewall Rule for Notepad.exe' Ensure = 'Present' Profile = ('Domain', 'Private') Direction = 'OutBound' RemotePort = ('8080', '8081') LocalPort = ('9080', '9081') Protocol = 'TCP' Description = 'Firewall Rule for Notepad.exe' Service = 'WinRM' State = 'Enabled' } xFirewall Firewall2 { Access = 'Allow' Name = 'NotePad++FirewallRule' DisplayName = 'Firewall Rule for Notepad++.exe' Ensure = 'Present' Profile = ('Domain', 'Private') Direction = 'OutBound' RemotePort = ('8082', '8084') LocalPort = ('9086', '9085') Protocol = 'TCP' Description = 'Firewall Rule for Notepad++.exe' Service = 'WinRM' State = 'Enabled' } } } #You only need to create checksums for PULL HTTP(s) methods New-DSCCheckSum –ConfigurationPath .\SimpleMetaConfigurationForPull –OutPath .\ScriptTest -Verbose -Force New-DSCCheckSum –ConfigurationPath .\SimpleMetaConfigurationForPull –OutPath .\DSCFirewallRule -Verbose -Force ScriptTest –nodename ‘LocalHost’,‘server1’,’server2’,’server3’ #Creates a folder with that name DSCFirewallRule –nodename ‘LocalHost’,‘server1’,’server2’,’server3’ #Creates a folder with that name #Push the configuration to the Target nodes, Comment this out if your just generating the MOF(s) for a pull method. Start-DscConfiguration -Path .\ScriptTest -Wait -Force -Verbose #Clears Firewall Rules Start-DscConfiguration -Path .\DSCFirewallRule -Wait -Force -Verbose #Sets them |
Now the following script above will create .MOF files that will then Now we have to create a Pull Server. Well have to do it like this for Server 2008R2 Src: https://davewyatt.wordpress.com/2014/06/07/how-to-install-a-dsc-pull-server-on-windows-2008-r2/ Or for Server 2012
|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 |
configuration CreatePullServer { param ( [string[]]$ComputerName = 'localhost' ) Import-DSCResource -ModuleName xPSDesiredStateConfiguration Node $ComputerName { WindowsFeature DSCServiceFeature { Ensure = "Present" Name = "DSC-Service" } xDscWebService PSDSCPullServer { Ensure = "Present" EndpointName = "PSDSCPullServer" Port = 8080 PhysicalPath = "$env:SystemDrive\inetpub\wwwroot\PSDSCPullServer" CertificateThumbPrint = "AllowUnencryptedTraffic" ModulePath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules" ConfigurationPath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration" State = "Started" DependsOn = "[WindowsFeature]DSCServiceFeature" } xDscWebService PSDSCComplianceServer { Ensure = "Present" EndpointName = "PSDSCComplianceServer" Port = 9080 PhysicalPath = "$env:SystemDrive\inetpub\wwwroot\PSDSCComplianceServer" CertificateThumbPrint = "AllowUnencryptedTraffic" State = "Started" IsComplianceServer = $true DependsOn = ("[WindowsFeature]DSCServiceFeature", "[xDSCWebService]PSDSCPullServer") } } } CreatePullServer |
After the pull …
Create a Dedicated Debug port on the ESP8266 NONOS SDK
So, The Wemos D1 Mini pro is the board I use to program the NONOS SDK right now currently. The downside is it only exposes one UART interface (UART0) and with that comes some minor issues. 1: If you connect an FTDI chip to this port the TX line from the FTDI is always HIGH …
Continue reading “Create a Dedicated Debug port on the ESP8266 NONOS SDK”
Using ASTreeView for Drag and Drop Action
First download NUGet from NuGet.org. Install it for your cordinating version of visual studio Once installed Launch VS then launch NuGet’s console from within Run the following line for Framework 4.0 and Above PM> Install-Package ASTreeView If your project is targeted to .Net Framework 2.0 or 3.5, please install the legacy package using this line …
Continue reading “Using ASTreeView for Drag and Drop Action”