Monday, April 22, 2013

Powershell Event Pictures and Presentation of Delhi User Group.

Hi,

On 20th April we had a half day Delhi user group meet at Microsoft office at Gurgoan.

I had a lots of fun there, I meet with different users, and some awesome Microsoft MVP’s.

To know about  upcoming Powershell events is Delhi/NCR area try to check my blog and stay tuned with Powerscripting Podcasts.

Pics:

58116_441432729274149_718457716_n 58147_441432602607495_419388326_n 165439_441432519274170_2144479977_n 315545_441432485940840_1581015439_n 387207_441432725940816_1005066017_n 422057_441432675940821_1888033258_n 431901_441435655940523_311193387_n 532951_441432539274168_357428892_n 931328_441434869273935_2117386856_n 934714_441432415940847_1983755948_n 934886_441432525940836_153967980_n 935140_441432575940831_2125295255_n 935274_441432442607511_1286611190_n

Script Showed in the Presentation :

  1. http://gallery.technet.microsoft.com/Ping-Multiple-Servers-ba915a7c
  2. http://gallery.technet.microsoft.com/Ping-Multiple-Server-Using-4f4d3dd0
  3. http://gallery.technet.microsoft.com/Ping-Multiple-Servers-and-df50cd28

Slide : https://dl.dropboxusercontent.com/u/17858935/DelhiUserGroupPresentation-April2013.zip

Thanks
Aman Dhally
 
 
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Monday, April 15, 2013

Samay : Powershell script based digital clock.

Hi,

Few days back i was writing an powershell GUI based script, in that script I need to add a clock.

First i thought how can i make a clock? I was thinking about an hour and then i got an idea. why not to use timer object and use it for creating an clock.

This is what i have done to create a GUI clock.
  1. Created a blank form on “Powershell Studio”
  2. Add a blank label to it
    1. 15-04-2013 23-12-48
  3. Added a time object to it.
    1. 15-04-2013 23-13-18
  4. In timer object property , i set Enabled to true, and interval to 1 {which is very low because the it is in milliseconds}
  5. Double click on “Timer” object and i added the below code.
  6. 15-04-2013 23-11-16
  7. In above code , i am just converting, Get-Date to string.
  8. and when you run scrip the outcome is running Powershell Digital clock.
Screenshot
15-04-2013 23-03-59

You can download the script from here: http://gallery.technet.microsoft.com/scriptcenter/Samay-Powershell-Digital-45acb9d2

Thanks
Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007




Download Link : https://dl.dropboxusercontent.com/u/17858935/Samay-Digital_Clock.zip

Powershell Event in Delhi User Group Meet.

 

Hi there!
For the month of April, Delhi User Group brings you a chance to learn enterprise-grade Microsoft technologies like PowerShell and SQL Server.

The half-day free event for professional developers in Delhi NCR includes a great line-up of industry-recognized speakers.

REGISTER | Registration required | Limited seats only

9:00 AM – 10:00 AM | Registration

10:00 AM – 10:45 AM
Automate your manual tasks with PowerShell
Aman Dhally

10:45 AM - 11:30 AM
SQL Server Databases: A Primer
Ahmad Osama

11:30 AM - 12:15 PM
Nuts and Bolts of Security in SQL Server 2012S
Sarabpreet Singh

12:15 PM - 12:30 PM
Break

12:30 PM - 1:15 PM
Exciting features for Devs in SQL Server 2012 + Demos
Brij Bhushan Mishra

1:15 PM - 2:00 PM
Data as a Service in .NET
Dhananjay Kumar

Date:
Saturday | April 20, 2013

Venue:
Microsoft
DLF Cyber Greens
9th Floor, Tower A
DLF Cyber City
Sector 25A
Gurgaon

Nearest Metro Station:
Sikandarpur (Yellow Line)

Contact:
Rishu Mehra
+91 9818562858

mail@delhiusergroup.in
www.delhiusergroup.in

REGISTER
Source: http://us1.campaign-archive2.com/?u=1ce3e2a8604cd419d0637a350&id=8292616e0d&e=

Tuesday, April 2, 2013

using Get-Location cmdlet in PowerShell.

Hi everyone.

Sometime, while using our regular or favourite cmdlets, we often forget to use non-regular, non-common cmdlets. When you look in to all cmdlets which powershell offers, you can see there may be few cmdlets which you never used and never notice them.

One of the cmdlet which i came to know is “Get-Location” whose alias is “pwd” (present working directory)

As its name defines , when you run it, it shows your location (not GPS one :D ), it shows you that  in which folder you currently working in.

02-04-2013 17-47-37

this cmdlet is very useful when you want to record you current folder location in to the powershell scripts.

This cmdlet has three main properties.

  1. Path
  2. Drive
  3. Provider

To check these properties we can put Get-Location in to a variable.

$location = Get-Location

02-04-2013 17-49-34

to know the path of the current location we can type $location.Path property.

02-04-2013 17-49-45

To know the name and other information, we can use $location.Drive property.

02-04-2013 17-49-57

to know the PS Provider type, we can use $location.Provide property.

02-04-2013 17-50-11

That’s all for now. :)

Thanks
Aman Dhally
 
 
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Wednesday, March 20, 2013

Powershell Script: Export EFS Certificates using Powershell.

Hi,
In my previous Article i post about how to create encrypted folder using powershell script. In encryption the most important thing is the backup of encryption certificate. We can export and save encryption certificate manually from control panel , using MMC and Certificate Snap-in or using cipher.exe.
But as we all love to use scripts , we can use a powershell scrip to export efs security certificate.

Download Link : http://gallery.technet.microsoft.com/scriptcenter/Export-EFS-Certificates-8ec8ba74

You can download the script and run it, this script will export the EFS Security Certificate to your “My Document” or “Document Folder”.
20-03-2013 00-04-05
I did not write this script, i have found it somewhere on the internet and lost is original source, and i also tweaked this script according to my need.

Download Link  :http://gallery.technet.microsoft.com/scriptcenter/Export-EFS-Certificates-8ec8ba74

Thanks
Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007

Monday, March 18, 2013

Powershell Script : Create An Encrypted Folder using Powershell.

Hi,

Windows Encryption is one of the best inbuilt security tool in windows7. My and my friends use windows encrypted file systems (EFS) a lot and may be you are using EFS in your windows environment.

Rather that create a whole DISK, My Documents, Desktop encrypted, I always prefer to create an encrypted folder somewhere on the disk and then put the files which you want to be encrypted in that encrypted folder.

I have written a small Powershell Script which created a encryption enabled folder on your desktop with folder name “Encrypted-Folder”.

You can download the script from this link : http://gallery.technet.microsoft.com/scriptcenter/Create-Encrypted-Folder-6f0fe0c9

Script Logic
I have created a small flow charts on how this script works.
Encryption Script Sample
How it works.
  1. This script check for folder name “Encrypted-Folder” on your Desktop.
  2. If the Folder Exists.
    1. then it check if the attributes of the “Encrypted-Folder” is contains encrypted.
      1. If the Folder Attributes on “Encrypted-Folder”  contains “Encrypted”
      2. Then it won’t do anything.
      3. but
      4. If the Folder attributes doesn’t contains “Encrypted-Folder” 
      5. then
      6. it runs “cipher /e” command to make folder encrypted
  3. If the folder Does not exists,
    1. then this create a new folder “Encrypted-Folder”  on your desktop
    2. and encrypt it.
In this script i am using “cipher /e” to enable encryption. I have tested this script on windows7 and windows8 and it is working fine for me.
Screenshots.
18-03-2013 15-55-02
18-03-2013 16-15-19
18-03-2013 16-16-04

You can download the script from this link : http://gallery.technet.microsoft.com/scriptcenter/Create-Encrypted-Folder-6f0fe0c9

That’s all for now.
Thanks
Aman Dhally
clip_image001 clip_image002 clip_image003 clip_image005clip_image007