Thursday, April 12, 2018

April 12, 2018

Active Directory Administration using Powershell: Add New User Account Script

I've been managing our company's Active Directory for quite some time now, and therefore I can attest that managing an Active Directory wasn't easy-peasy at all specially for Admins like me who has little to no knowledge or no formal education/training with regards to Domain Administration.

At first, maintaining manually using Active Directory Users and Computers Management Console, and Active Directory Administrative Center (ADAC) takes so much clicking and navigation. What more if you need to administer bulk AD objects (e.g. changing expiration date of users)? Such a pain, right? So I decided to study and give Windows Powershell a shot.

With Windows Powershell, I am able to administer our Active Directory seamlessly. Today, I will share a simple script on how to create a user account given some default or constant attributes/parameters.

Remember to save the script as *.ps1 extension.

When run, it will prompt for admin to provide First Name, Last Name and Employee Number of the user. This script will also get present date and add 180 days to it to set as account expiration date. You can modify the script for whatever is necessary to match your company's requirement.

I leave comments on important lines to further explain what are they for.
 #This script will add new user for Department1
$FN= read-host 'First Name'
$LN= read-host 'Last Name'
$CN= Write-Host "$($FN) $($LN)"

#In this example, I used Employee ID/Number as SamAccountName
$ID= read-host "Employee Number"

#This will get current date and add 180 days for account expiration
$XD= (Get-Date).AddDays(180).ToString("MM-dd-yy HH:mm:ss")

#This will convert the result of above computation to Date&Time format
$CXD = [DateTime]$XD

#Default password for new account, just replace quoted text
$Pass= "defaultpassword*098"

#This will convert default password set to Secure String
$SecureString = ConvertTo-SecureString $Pass -AsPlainText -Force

#This creates the new user account based on the inputs above
New-ADUser `
           -Name "$FN $($LN)" `
           -AccountPassword $SecureString `
           -SamAccountName "$ID" `
           -DisplayName "$FN $LN/Domain/Domain" `
           #This will enable the new created account
           -Enabled $true `
           -GivenName $FN `
           -PassThru `
           #This will disable password never expire attribute for security purposes
           -PasswordNeverExpires $false `
           #This will set the converted result of account expiration computation from above
           -AccountExpiration $CXD `
           -Surname "$LN" `
           -UserPrincipalName "$" `
           #This will enable change password attribute upon user first login
           -ChangePasswordAtLogon $true `
           -Office "Branch Location" `
           -Description "Employee Account, Department1" `
           #replace this with your AD Organizational Unit Path
           -Path "OU=Department1,OU=User_Object,DC=Domain,DC=Company" 

#This will get new created user based on SamAccountName for additional parameter changes
Get-ADUser "$ID" | 

#This will enable account protection from accidental deletion
Set-ADObject -ProtectedFromAccidentalDeletion:$true

#This will add the new created user to Department1 AD Group
#Note that you can add additional default groupings
Add-ADGroupMember "Department1" -Members "$ID"


Sample output:

Hoping somehow, I am able to help somebody with this simple script.

I will post more sample powershell script I am using in administering Active Directory.

For questions, concerns, requests, or something that's bothering you and is related to this script, I will gladly help for as far as a I can.

Wednesday, January 10, 2018

January 10, 2018

Reset forgotten Local Admin Account for Windows Server 2008, 2008 R2 & 2012

It is such a nuisance being unable to login to any system, especially when the reason is not because of any system failure but because of just simply forgetting the password one previously assigned. This can happen to anyone. Without proper keeping of your credentials might give you a headache in the future.
In cases of Windows servers, it is a good thing that their is a course of action we can rely to without the use of any third party application and totally free of cost in case we forgot the local administrator password we set during the day when we first set it up.
In this post, I will present to you step-by-step on how to reset the local administrator's password applicable and tested to work in Windows Server 2008, Windows Server 2008 R2 and Windows Server 2012. I am not sure if this is still applicable for Windows Server 2016 and the future...

Are your ready? Let's start!

  1. First, insert Original Windows Server 2008/2012 installation DVD.

  2. Boot computer from Server 2008/2012 installation DVD.

  3. Select “Repair your computer”.

  4. Select the first option “Use recovery tools...” then click Next.

  5. Select “Command Prompt”.

  6. Backup Utilman.exe using below command:
    MOVE C:\Windows\System32\Utilman.exe C:\Windows\System32\Utilman.exe.bak

  7. Copy cmd.exe and rename it Utilman.exe
    COPY C:\Windows\System32\cmd.exe C:\Windows\System32\Utilman.exe

  8. Restart and boot to normal OS.

  9. On the logon screen, click Ease of Access icon or press Windows key + U. A command prompt window must appear. 

  10. To change password, input the following:
    net user administrator *

  11. Once you press enter you will asked to set a new password and then confirm it, when entering your new password don’t worry if you can’t see them as you type, they are invisible, they are however being remembered.

  12. Once you’re logged in again don’t forget to delete Utilman.exe and then rename Utilman.exe.bak back to plain old Utilman.exe.

That's all. Hoped this TUT was able to help you somehow. For an IT practitioner, especially for System Engineers and Administrators this is a must learn, for you'll never know when will it become in handy.
Thanks for dropping by.

Monday, September 4, 2017

September 04, 2017

Review: Atmos Fit Elite

I recently purchased Atmos Fit Elite, been trying to google for some reviews about it before deciding to buy and I noticed that there are only a few articles on the internet about it, so I come up with writing an entry to share some insights and my experience with it.

I’ve seen the product first in pictures from the Facebook page of Kimstore and got curious. That time, I don’t have a wrist watch because my brother asked my previous watch and I gladly gave it to him, resulted in buying this one. Why not give it a try, I thought. The item looks decent and that aside from being a watch, it offers more features than a regular wrist watch since it’s a smart fitness band. I bought mine on Kimstore. At Php890.00 you already have a watch with a plus. A lot cheaper compared to other fitness band out there.

I received the item two days after I made my purchase online, fast and smooth transaction indeed, that’s Kimstore for you. BRAVO!

The packaging was elegant, with a magnetic flip cover and doesn’t look cheap at all. The smart fitness band is available in two colors, black and blue. The package includes the smart fitness band, clip charger and operations manual.

Been using it for quite some time now and so far I am satisfied. The battery last for more than 1 week. It has its own application, available for Android and iOS devices. Settings are on the application and will automatically sync via Bluetooth. Aside from displaying time, the fitness band features step counter, sleep analyzer, distance tracker and a heartbeat counter. The numbers it shows are quite dependable. It really does the job. Compared to its predecessor, Atmos Fit Elite offers more functionality and is rated IP67 which means it is completely dust proof and splash resistant. I already tried taking a shower with it and still functioning after.

The mobile app was decent enough and simple for non-techy users out there to understand. It can notify you on your notifications only when the Atmos Fit is paired via Bluetooth which is very much convenient when working out. Set alarm and notifications will notify you by vibration.
fitnessband Mobile Application

  • Lightweight
  • Unisex design
  • Rechargeable
  • Long battery life (at least 12 days)
  • Cheap, less than Php1000.00
  • Compatibility with both Android and iOS devices
  • Syncs in no time
  • Water splash resistant
  • Dust resistant
  • Alarm and notification function
  • It does the job

  • No always on display for clock
  • Screen is prone to figerprints
  • Configurable only via the official app

Saturday, July 22, 2017

July 22, 2017

Tukal tukal Falls

I have so many pending stories to tell, but I always get excited for the new ones, so I am writing an entry regarding my July’s leisure travel. I am not ditching those I promised to continue because trust me, I will surely find time.
Tukal-tukal Falls

This time, we didn’t go anywhere further and chose to visit the recently discovered Tukal-tukal Falls located only at Botolan, Zambales. We are teased from a post on Facebook showcasing what Botolan has to offer when it comes to Tourism and voila! Little did we know, our eyes were set on this magnificent natural wonder. We made the necessary preparations and marked the calendar for a 1 day time event. We went last Sunday (July 16, 2017). We are a group of 9 pax. Call time was 5AM, and this time I was the first to arrive (proud early bird haha). From Olongapo to Botolan it took us 1hour and a half since we rented a van. We stopped at the Botolan Municipal Hall to take some pictures before proceeding to the registration site. Camp Kainomayan, which was the registration site, was not yet pinned on any GPS maps like Google Maps or Waze so it took us a while to figure out the route by asking local residents. Yes! We finally reached Camp Kainomayan at exactly 7AM, so what’s next? Camp Kainomayan offers ATV rides on the main camp or on the vast lahar landscape, trek towards Tukal-tukal Waterfalls, and even visit the famous disastrous beauty, Mt. Pinatubo. We didn’t change mind and chose what we came for. Registration amounts to Php500.00 per head inclusive of a 4x4 ride. Riding a 4x4 we started around 7:30AM.
Camp Kainomayan, San Juan, Botolan, Zambales

To Tukal-tukal Falls

We had a fun, dusty and bumpy ride. We witnessed the on-going government project of Botolan-to-Tarlac road construction. The 4x4 ride was such a marvelous addition to the experience. It took us almost an hour to reach the jump-off where we finally started trekking. On our feet, we headed with eagerness. The surrounding was outstanding. The scattered mountain rocks along with fresh green grasses made the landscape appealing and heartwarming. I felt gladly lost again in nature away from all my obligations and this was indeed my much needed escape. Since the scenery was picture perfect, we had lots of photo ops along the trail. The weather was quite favorable compared to the previous days before this scheduled outdoor activity; no rain, no sun, just a pleasant cloudy day and the best day for swimming.
4x4 Ride @ vast lahar

Jumping forward, we finally reached Tukal-tukal Falls at approximately 9:30AM. Tukal-tukal, on their dialect was the term for staircase because it does resemble one, a huge one; like a stair made especially for Fee, Fye, Foe, Fumm and Fallon or for BFG, the famous giants from the Hollywood movies. It was a series of waterfalls consisting of four that comes in different heights and ample. Each waterfall has a pool like basin with a depth suitable for cliff jumping. The water was crystal clear as what the pictures and video depicts (see below). We tried cliff jumping and it was a hell of an experience. I was trembling despite the average height of the cliff and being capable of swimming. I thought that it would be easy at the drop of a hat, but that moment when I’m already on the cliff, and my feet were refusing to take a leap, I took a deep breath and let go. Letting go was never easy, unless you have complete trust with what you have, what you can do and what could happen. Cliff jumping was such a fun thing that we did it over and over. We chowed down earlier than noon time because the monsters residing on our tummies were already roaring. After having our lunch, we swam on all four basins undeterred by the ice cold water to our delight. I even tried rock climbing from the third waterfall going to the fourth waterfall basin, which was another first on my existence.
Tukal-tukal Falls
Tukal-tukal Falls
Tukal-tukal Falls

The Gate of Hell

Tukal-tukal Falls

Our guide said, he will take us to another waterfall that was just along the trail so he encouraged us to descend early. At approximately 11:50, we descended. It was indeed just along the trail, but we didn’t notice it during our trek to Tukal-tukal waterfalls because it was hidden down the slope. We reached it around 12:30. This one was also magical, it looks like a sanctuary. The locals call it “Bibig ng Impyerno (Mouth/Gate of Hell)”, maybe because of its depth, the cave like appearance and the creepy ambiance which I thought was perfect for a horror movie location. The water was also ice cold and crystal clear with a darker look due to its depth. We spent another 30minutes here dipping, chit chatting and taking pictures. We enjoyed taking underwater shots, but I didn’t swim here a lot compared to Tukal-tukal falls because I started feeling my legs are about to cramp.
Bibig ng Impyerno Falls

From the Gate of Hell going back to the 4x4 vehicle, it took us 20minutes then another joyride. We asked the driver to have a little stopover at the vast lahar for some pictures.
Vast lahar, San Juan, Botolan

At 2PM, we are already in Camp Kainomayan. We took turns taking shower while waiting for the van and at 2:30PM, we are already on our way back to Olongapo.
Tuka-tukal Falls

This adventure was truly not a dime a dozen kind of outdoor experience.

Tukal-tukal Falls Adventure on Vimeo

Monday, June 19, 2017

June 19, 2017

Way to Silanguin Cove via Mt. Cinco Picos Traverse

It feels good to be able to write an entry again. This time it is about our most recent adventure; Way to Silanguin Cove via Mt. Cinco Picos Traverse.

Mate before I start, let’s gen up a bit. Here’s a little information about Mt. Cinco Picos taken from Pinoy Mountaineer page

Subic, Zambales

Major jump-off: Sitio Cawag Settment, Subic

LLA: 14° 47′ N 120° 9′ E, 881 MASL

Days required / Hours to summit: 2 days / 6-7 hours

Specs: Major climb, Difficulty 3/9, Trail class 3


Mt. Cinco Picos in Subic, Zambales is a hiking destination that is attracting the interest of more and more climbers. Once a training ground for US servicemen stationed in the now-defunct Subic Naval Base, this mountain, like the nearby highlands, is home to the local Aetas who call the mountain “Tatlong Tirad”. The Spanish name ‘Cinco Picos’ represents the five peaks of the mountain. –Pinoy Mountaineer

The Plan vs. The Weather

We went last June 11 and 12. We’ve been planning on this for a month, to have a night stay at Silanguin Cove and since the Independence Day (12th day of June) falls on Monday, considering our day off from work (Sunday), it was indeed the perfect time so we marked the calendar and started preparing. We are a group of 11 pax divided into two teams, the team Bangka (composed of 4 pax) who bravely tamed the waves, and the strong-willed team Bundok (composed of 7 pax). Both teams decided to push through despite the threat imposed by the Low Pressure Area during that time.

Image source:

At first it feels so daunting; can we really make it amidst the forming storm? I am worried, especially for team Bangka. They will be sailing for one or more hours into the open sea. I don’t want to think about the worst case scenario, but I can’t help it. But we, the team Bundok still decided to go.
A post shared by Mon Laguatan (@kiksmon21) on

The Ascend

At 2AM on June 11, we, the team Bundok, was already on our feet at Cawag Settment (Jump-off) when suddenly it rained hard. All went crazy looking for raincoats. But wait, I don’t have one. Despite the preparation and the effort of my friends to remind me since we expect a moody weather, still, I failed to bring one. So that leaves me no choice but make do with what we have and make it work. I used garbage bags instead. The idea was brilliant but they were teasing me the whole time. (Savage right??). Moving on, we really had a hard time. The trail was slippery and muddy that our feet were sinking up to the ankle. Good thing this time we brought flashlights because the surrounding was still pitch-black. We can also see the lights of other hikers from neighboring mountains (Mt. Balingkilat and Mt. Bira-bira) We’ve gone to many ups-and-downs yet our guide says we are still far and the first peak was nowhere in sight, it felt like we’ve traversed two mountains already. Cheesed off, it really felt like forever. Due to the bad weather, we had little stop overs and rests on our way to the first peak, it helped on quenching our thirst. Imagine I am able to reach the site overlooking the Hanjin Heavy Industries and Construction Philippines without a single sip from my packed water. We stayed on that site a bit for some snacks and photo ops.
Cinco Picos

Cinco Picos
Cinco Picos
Cinco Picos
Cinco Picos
Cinco Picos
Cinco Picos

The Summit (First Peak)

As we continued our way to the first peak, the trail was becoming rocky, and from there we have already been greeted by the mist, kissing our cheeks and moisturizing our skin. Numerous rock formations can be seen which reminds me so much of Mt. Maculot Rockies, but it’s the mini and scattered version. Like our hike to Mt. Maculot, we had little chances of clearing to gasp the breathtakingly blinding view. There’s an element of surprise, like a theatre with curtains waiting for the show to commence. We stayed for almost an hour for cell phone signal because we need to contact and verify if the team Bangka could sail and if ever they were not allowed, they will try the next day. If the weather doesn’t get better till the next day, we have no choice but to traverse back to Sitio Cawag.
Cinco Picos
Cinco Picos

Cinco Picos
Cinco Picos
Cinco Picos

During our stay on the first peak, we had fun taking pictures and videos. We managed to film a short Mannequin Challenge when suddenly, the warm, fun time we had turned into a cold terrifying experience. The rain started again with the wind blowing hard. We thought that it wouldn’t last like our earlier experience, but we were wrong. We secured our backpacks using garbage bags. Raincoats are no matched, we are all soaked. Our bodies were shaking with cold. We decided not to pursue the second peak even if it will only take just 15 minutes to get there. The second peak was higher and we witnessed from afar that it was covered with fog. We are petrified for what could happen. We sat still while waiting for team Bangka’s reply, and when the rain dwindled, we took that opportunity to descend towards Silanguin Cove.
Cinco Picos

To Silanguin Cove

On our way, we met a group of hikers from Manila who stayed for a night at a camping spot just along the trail. They are already gearing up when we asked them if they will also proceed to Silanguin Cove, but they were still undecided and were also weighing the chances if the weather will soon be better. It was a long rocky descending trail. The way to Silanguin Cove was full of river crossing. I wasn’t able to keep track of the number of rivers we crossed so I cannot declare an exact digit.
Silanguin Cove

We reached Silanguin Cove and everything was hunky-dory except of course that we do not know if team Bangka sailed and of that moment we don’t have ways to communicate to them as cell phone signals are no longer available. We are absolutely knackered after walking like forever, so we took our rest while worrying for the next thing to do.
Cinco Picos

Stay tuned to know how team Bangka made it...

Follow Me On Instagram