Ask Developer Hangout – 44 – Getting started with PowerShell with Sherif Talaat
The weekly hangout for Egyptian Geeks Developers.
The Event time
08:00 PM Cairo Local Time
11:00 AM US (Pacific Time)
02:00 PM US (Eastern Time)
اللقاء الأسبوعي للمطورين المصريين و مجموعة Ask Developer على Google+ Hangout
اللقاء يوم السبت الموافق 4 أبريل 2015
الساعة 8 مساءً بتوقيت القاهرة
الساعة 11 صباحاً بتوقيت الولايات المتحدة (توقيت الساحل الغربي)
الساعة 2 ظهراً بتوقيت الولايات المتحدة (توقيت الساحل الشرقي)
Ask Developer Hangout – 44 – Getting started with PowerShell with Sherif Talaat
Get IE Tabs and re-open in Chrome
بعد معاناة شديدة مع الانترنت اكسبلورر ومحاولات كثيرة للبقاء عليه كالمتصفح الأساسي، اكتشفت ان ده حاجة مستحيلة خصوصا ان الاكسبلورر بيبدا يخرف ويستخدم مساحة كبيرة من الـ RAM لأسباب غير معروفة .. ونظرا اني اتعودت استخدم الاكسبلورر لسنين طويلة فكانت النتيجة ان بشكل لا إرادي بفتح عدد كبير من الصفحات و بعد كده أكتشف ان محتاج انقلهم لمتصفح تاني وغالبا بيكون Chrome .. لهذا السبب قررت ان اكتب سكربت يقرا كل صفحات الاكسبلورر و يعيد فتحها في جوجل كروم
$Urls = (New-Object -ComObject Shell.Application).Windows() | Where Name -eq "Internet Explorer" | Select LocationURL
ForEach($Url in $Urls)
{
If(![string]::IsNullOrEmpty($Url.LocationURL))
{
Start-Process "Chrome.exe" $Url.LocationUrl
}
}
Stop-Process -Name "iexplore"
How To: Use App-V Unattended Installer
In this tutorial I’ll show you how you can use App-V Unattended Installer to build a complete App-V environment for testing purposes and small size production environment.
What is App-V Unattended Installer?!
Simply, it’s a combination of Windows PowerShell scripts running behind a simple GUI wizard that requires the user to input a couple of few elements and does all the necessary steps and configurations to setup App-V Server 4.6 SP1 according to “Microsoft App-V 4.6 SP1 Trial Guide“.
How to use it?!
As mentioned above, App-V Unattended Installer does all the installation and configuration from A to Z. So, you don’t have to install any pre-requisites before you use it. All you need is a Domain-Joined machine running just Windows Server 2008 R2.
Now, let start building the App-V environment by following the steps below:
1- After you download the App-V Unattended Installer, execute the AppVinstaller.exe
2- Once you launch the wizard you will be 3 steps away from your new App-V environment. Click Start to go to the first step.
3- In the first step you select the sources required for your step. We have 4 inputs (sources) required for this step.
– SQL Server 2008 R2: Make sure to use Std. or Ent. edition.
– App-V Server 4.6
– App-V Virtual Package: If you have any ready made sequenced app-v package, you can select it and the wizard will import it during the installation.
4- In the second step you enter the Active Directory configuration and the Credentials to be used by the wizard to do the installation.
Active Directory:
– App-V OU: The name of Organization Unit (OU) that will contain App-V Users and Group.
– App-V Admin Group: The name of App-V Administrators Group.
– App-V Users Group: The name of App-V Users Group.
Credentials:
Enter a domain-admin credentials that will be used during the installation. You will not be able to proceed until you validate you credentials and make sure that you entered a valid username and password, and you account the part of Domain-Admin group.
5- The 3rd step is the last step where the wizard start the installation and configurations part. This step takes around 30 – 45 minutes to do the following:
– Create the required Active Directory Users and Groups
– Install and Configure IIS
– Install and Configure SQL Server
– Install and Configure App-V Server
– Import and Configure App-V Applications
6- After the installation, complete simply click Finish to close the wizard
Now, your app-v environment is up and running with all your virtual application and packages imported and configured. In order to validate you installation, install and configure App-V client on any other machine and try to connect to the server and launch your applications from the client’s machine.
PowerShell Snap-in for Microsoft App-V Server 4.6 SP1
تم الإنتهاء من إصدار النسخة التجريبية من الـ PowerShell Snap-in الخاص بـ Microsoft App-V Server. هذا الإصدار يحتوي على 23 أمر من أوامر PowerShell والتي تغطي تقريبا 80% من App-V GUI console وذلك لتبسيط التعامل مع الـ App-V و كذلك عمليات الـ Administration المعقدة بقدر الإمكان عن طريقة إستخدام PowerShell.
Cmdlets
System Options
- Get-AppVSystemOptions
- Set-AppVSystemOptions
Packages
- Get-AppVPackages
- New-AppVPackage
- Remove-AppVPackage
Application Groups
- Get-AppVApplicationGroup
- New-AppVApplicationGroup
- Remove-AppVApplicationGroup
Applications
- Get-AppVApplications
- New-AppVApplication
- Remove-AppVApplication
- Set-AppVApplicationPublishingSettings
Administrators
- Get-AppVAdministrators
- New-AppVAdministrator
- Remove-AppVAdministrator
Server Groups
- Get-AppVServerGroup
- New-AppVServerGroup
- Remove-AppVServerGroup
Servers
- Get-AppVServers
- New-AppVServer
- Remove-AppVServer
Providers
- Get-AppVProviders
- Remove-AppVProvider
للتحميل و طريقة الإستخدام: Microsoft App-V Server SnapIn
Windows Management Framework 3.0 – (CTP) #1
أزاحت ميكروسوفت الستار عن النسخة التجريبية من الإصدار الثالث لـ Windows Management Framework الذي يحتوي على:
- Windows PowerShell v3.0
- WMI
- WinRM
PowerStudio
PowerStudio هو عبارة عن Extension لبرنامج Visual Studio 2010، نقدر نطلق عليه نوع من الـ integration بين الـ PowerShell و الـ Visual Studio. الهدف منه هو إستخدام بعض المميزات features الموجودة داخل برنامج Visual Studio لكتابة كود PowerShell. على سبيل الثال، Color Coding و IntelliSense و Syntax Error Detection.

PowerStudio متاح للتحميل على Visual Studio Gallery
PowerShell Tips & Tricks: Tip# 11 List installed COM Objects in Windows
كنت أقوم بالبحث عن بعض المواضيع الخاصة بإستخدام COM Objects مع PowerShell و وجدت السكربت التالي. هذا السكربت يقوم بالبحث عن جميع الـ COM Objects الموجودة داخل Windows.
gci HKLM:\Software\Classes -ea 0| ? {$_.PSChildName -match '^\w+\.\w+$' -and (gp "$($_.PSPath)\CLSID" -ea 0)} | Out-GridView
للأمانة العلمية، السكربت منقول من احد المنتديات في الرد على أحد الأسئلة دون ذكر إسمه المؤلف .. في حالة معرفة إسم المؤلف برجاء إرساله لنتمكن من إضافته للموضوع
Download all SharePoint 2010 prerequisites on one-click using PowerShell
النهارده هنتكلم عن سكربت اسمه AutoSPInstaller ، السكربت ده كتبه شخص اسمه Brian Lalancette وهو احد محترفين الـ SharePoint.
الهدف من AutoSPInstaller هو تحميل و تخزين جميع الملفات المطلوبة او ما يسمي prerequisites من Windows Update و Hotfix و Software على الكمبيوتر الشخصي او السيرفر حني نتمكن من تركيب SharePoint اوفلاين و بدون الحاجة إلي انترنت وتوفير الوقت الضائع في تحميل هذه الملفات كل مرة نقوم بتركيب SharePoint.
رابط التحميل AutoSPInstaller
PowerShell Tips & Tricks: Tip# 10 How to Generate Secure Random Password
في الموضوع ده هنعرف ازاي نكتب كود PowerShell يستخدم dotNET Methods.
في المثال ده هنستخدم Membership.GeneratePassword وهي Method مسئولة عن إنشاء Complex Password بشكل عشوائي و التي من الممكن ان تستخدم في عمليه إنشاء مستخدمين Exchange و Active Directory
# namespace: System.Web.Security
# assembly: System.Web (in System.Web.dll)
# method: GeneratePassword(int length, int numberOfNonAlphanumericCharacters)
#Load "System.Web" assembly in PowerShell console
[Reflection.Assembly]::LoadWithPartialName("System.Web")
#Calling GeneratePassword Method
[System.Web.Security.Membership]::GeneratePassword(10,0)
The 2011 Scripting Games
2011 Scripting Games
غداَ إن شاء الله هو اليوم الأول في دورة Scripting Games السنوية. تبدأ الدورة يوم 4/4/2011 وتنتهي يوم 15/4/2011.
تحتوي الدورة على مجموعة كبيرة من الإلعاب و التصنيفات لجميع الفئات المبتدئين والمحترفين.
تساعد الدورة في إكتساب بعض المهارات العملية في كتابة السكربت بالإضافة إلي بعض الجوائز القيمة للمتسابقين.




