PowerShell – Detect AzureAD Device
Code.ps1 $dsregStatus = & dsregcmd /status $isAzureADJoined = $dsregStatus -match “AzureAdJoined\s*:\s*YES” $AzureAD = if ($isAzureADJoined) { “TRUE” } else { “FALSE” } Maximize Window Copy Code
Lab Core | The Lab of MrNetTek
A blog about IT, technical solutions, and code.
Code.ps1 $dsregStatus = & dsregcmd /status $isAzureADJoined = $dsregStatus -match “AzureAdJoined\s*:\s*YES” $AzureAD = if ($isAzureADJoined) { “TRUE” } else { “FALSE” } Maximize Window Copy Code
Aquarius: 1 2 3 4 5 6 7 8 9 10 11 12 13 In this project, I test an RGB LED. The RGB color model is an additive color model in which the red, green and blue primary colors of light are added together in various ways to reproduce a broad array of colors. Read More …
Aquarius: 1 2 3 4 5 6 7 8 9 10 11 12 13 In this project, I build upon the ideas in Project 2, which has two LEDs and a photoresistor. I added a fan to project 3. The fan simulates a cooling system during charging. The red LED will be lit while the Read More …
Aquarius: 1 2 3 4 5 6 7 8 9 10 11 12 13 In this project, I build upon the ideas in Project 1, and use discrete LEDs on a breadboard to visibly show when low or bright light is detected. Red is low light. Green is bright light. It is essentially a light-sensing Read More …
Aquarius: 1 2 3 4 5 6 7 8 9 10 11 12 13 The Aquarius endeavor is a challenge to post 100 Arduino projects demonstrating various technologies and concepts. — In this project, I create a photosensitive built-in LED blinker, which is controlled through programming the Arduino microcontroller. The built-in LED blinks at a Read More …
Using Split Using Regex Notes str.split re.split
Output Input.txt This text file contains eddiejackson1@test.com AA aa BB bb. This text file contains eddiejackson2@test.com CC cc DD dd. This text file contains eddiejackson3@test.com EE ee FF ff. This text file contains eddiejackson4@test.com 1234567890. This text file contains eddiejackson5@test.com 1234567890. This text file contains eddiejackson6@test.com 1234567890. Output.txt eddiejackson1@test.com eddiejackson2@test.com eddiejackson3@test.com eddiejackson4@test.com eddiejackson5@test.com eddiejackson6@test.com
Using the Security.Cryptography class, you can encrypt and decrypt files pretty easily. I was experimenting with taking a plaintext message, encrypting that message into a text file, and then reading and decrypting the message. Something that fascinates me is the encryption key is stored and can be extrapolated from the text file. Compiled in Microsoft Read More …