PowerShell25 9. Learning Projects - Lottery number generator Korean lottery is a game to select 6 numbers out of number range from 1 to 45 without same number and regardless order. 1st prize winner is one who gets all 6 numbers matched which are randomly chosen by lottery number picker machine. PowerShell provides "Get-Random" built-in command which makes things quite easy. To print out 6 numbers in the range between 1 to 45, one line script does it all. .. 2023. 5. 8. [PowerShell]9. Learning Projects - Finding prime numbers A prime number is a whole number greater than 1 whose only factors are 1 and itself. For example, number 2 is a prime number because it can be divided by only 2 and 1. Howerver, since 4 can be divided by 1, 2 and 4, number 4 is not a prime number. Let's write a script to figure out prime numbers within a certain number range. This can find all prime number and print them out. If we want to know .. 2023. 5. 8. [PowerShell]8. Exception(error) Handling Scripts do not always go as intented. Errors in the middle of task can harm data reliability. For example, Active Directory user account inactivation script stops in the middle the task and it only partly removed AD groups which is related to Office 365 licenses. This can mislead that the user account has been deactived as status but actually the business ends up paying license fees until someon.. 2023. 5. 2. [PowerShell]Moving Computers from OSD Folder [Scenario] In AD(Active Directory) OSD OU(Organizational Unit), there are number of computers which have not been placed to local OU properly. This could cause issues such as AD policy unsync and lack of local admin. manegebility due to absence of local admin. AD group assigment. [Objectives] - Create PowerShell script to place computers in OSD OU to local OU - Make it run daily - Send email as .. 2023. 4. 24. 이전 1 2 3 4 5 6 7 다음 반응형