If you are one of SCCM administrators and one of you nightmares is the bulk of error messages you receive due to misconfiguration of IIS WebDAV settings, and you are looking for a way to kill you pain. So, it’s my pleasure to inform you that finally you reached your destination. :) :)
In the next few lines I’ll show you how I used AppCmd with PowerShell flavor to automate the process of configuring IIS WebDAV settings in order to smoothly install SCCM 2007 on Windows Server 2008.
So, what’s AppCmd?!
AppCmd.exe is a command-line utility used to for building advanced management actions and administration tasks for IIS 7.0. This tool resides under “%SystemRoot%\System32\InetSrv\”.
For more info about AppCmd … Check this article
In the script below, I used AppCmd to change WebDAV settings, then compiled it in a form of script using PowerShell. The syntax is very straightforward just read the comment before each command-line and you will know the function.
# ---- Start of Code ----- #
# Load AppCmd Directory
$AppCmdDirectory = $env:SystemRoot + "\System32\inetsrv"
cd $AppCmdDirectory
# Enable WebDav
.\appcmd.exe set config "Default Web Site/" /section:system.webServer/webdav/authoring /enabled:true /commit:apphost
# Add Authoring Rule
.\appcmd.exe set config "Default Web Site/" /section:system.webServer/webdav/authoringRules /+"[Users='*',path='*',access='Read']" /commit:apphost
# Enable "Allow Anonymous Property Queries"
.\appcmd.exe set config "Default Web Site/" /section:system.webServer/webdav/authoring /properties.allowAnonymousPropfind:True /commit:apphost
# Enable "Allow Anonymous Property Queries with infinite depth"
.\appcmd.exe set config "Default Web Site/" /section:system.webServer/webdav/authoring /properties.allowInfinitePropfindDepth:True /commit:apphost
# Disable "Allow Custom Properties"
.\appcmd.exe set config "Default Web Site/" /section:system.webServer/webdav/authoring /properties.allowCustomProperties:false /commit:apphost
# Enable "Allow Hidden Files to be listed"
.\appcmd.exe set config "Default Web Site/" /section:system.webServer/webdav/authoring /fileSystem.allowHiddenFiles:True /commit:apphost
# ---- End of Code ----- #
WebDAV changes in this scripts happens according to this article: How to Configure Windows Server 2008 for Configuration Manager 2007 Site Systems
Regards Sherif Talaat (Twitter: @Sheriftalaat)
It’s possible to reset your Windows Sever 2008 / R2 Domain Controller administrator password using your installation CD.
1. Restart your Windows server 2008 DC with the installation CD2. Choose your language and click next
3. Select your partition and installation version and click Next
4. Click on Comm and Line Prompt
5. Change directory to the access the system 32 directory. Then your original C:drive is changed to D: or E: depending on the number of drive and partitions you have on that system.
6. Rename the file Utilman.exe to Utilman.exe.bak using the comm and Copy Utilman.exe Utilman.exe.bak.
7. Using Command Move Cmd.exe Utilman.exe to move CMD.exe file into Utilman.exe. Press O or Y to accept after that restart your Computer normaly
8. At the user logon screen, press a combination of Windows KEY+U, then the CMD.exe will appear. Type net user “Username””new password”;
Then your system Admin Password is reset. Please don’t forget to rename back Utilman. Exe ->Cmd.exe and Utilman.exe.bak-> Utilman.exe after getting back access.
Sometimes, when you receive an e-mail in outlook with an attachment, you receive a message informing you that outlook blocked access to this unsafe attachment.
You receive this message due to a security feature in outlook that blocks attachments with a specific file extension (e.g. *.EXE, *.VBS, *.PS1) that might put your computer at risk. You can’t open, save, or even delete it.
According to Microsoft KB Article #829982, there are four different ways to get your attachment, but these ways will require either the sender to change the file extension and re-send it or the Exchange administrator to change the security policies. The first scenario might fail if your company has a smart e-mail protection solution that scans the file itself regardless the extension. The second scenario always fail because there is no admin on earth would like to put himself and his environment in a risk because of email attachment. :)
Don’t worry, always there is a solution. According to the same KB article you can edit a few registry keys to change the outlook’s attachment security settings on your local machine. But first you should know and always remember that serious problems might occur if you modify the registry incorrectly. :)
Well, instead of taking the risk of editing the registry manually and corrupting your system. I wrote a GUI PowerShell script that edit registry instead of you to avoid any unwanted changes.
The interface is very simple. All you have to do is just write down the extension, chose wither allow or block, save your changes, and then restart your outlook.
Download Outlook's Attachment Security Editor
Regards,
Sherif Talaat (Twitter: @Sheriftalaat)
Dear SharePoint Geeks,
I’m writing this post to share with you a very interesting PowerShell script called “AutoSPInstaller”, this script developed by Brian Lalancette for an easier SharePoint 2010 deployment process.This script downloads the files required by PrerequisiteInstaller.exe in advance. So, you can complete your SharePoint’2010 installation Offline.
All you have to do is just run the script, download the files, and then use the appropriate command-line switch with PrerequisiteInstaller.exe to allow installation from a locally stored hotfixes and prerequisites.
Download AutoSPInstaller
The goal of this post is to show you how you can use Windows PowerShell to call .NET Method().
Simply, all you have to know is the namespace, assembly name, and the method name.
So, how can I do that ?!
In the following example I'll use Membership.GeneratePassword Method to generate a Complex Passwords randomly
# 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)
http://technet.microsoft.com/en-us/library/hh322889(WS.10).aspx
Was just annouced today August 2nd 2011.
:-) it has something for everyone.
Khaled Hnidk (Twitter:@khnidk)