Setup: You have a SharePoint farm with an web application configured to use ADFS 2.0 for authentication via Trusted Identity Provider. Problem: You want to add another web application to this SharePoint farm and configure the authentication via ADFS Solution: Open SharePoint PowerShell and issue the following commands: where appname is the alias of your […]
Monthly Archives: March 2014
Get all VMs with .ISO mount as DVD on SCVMM 2012
Setup: SCVMM 2012 (System Center Virtual Machine Manager 2012 ) installed Problem: You have a SCVMM 2012 server and you want to list all VMs with .ISO files mounted as DVD into VM Solution: Run this PowerShell command:
Reset MYSQL root password on Linux
Setup: MYSQL server running on Linux Problem: root account password is lost. You need a method to reset the password and login. Solution: Stop MySQL On Debian or Ubuntu or on CentOS, Fedora, and RHEL: Next we need to start MySQL in safe mode. You should be loged in as root now, as we skipped […]
Add BUILTIN\Administrators group in SQL and add sysadmin role
Setup: SQL 2008, SQL 2008 R2 or SQL 2012 fresh install Problem: After default installation of SQL, the BUILTIN\Administrators group is not granted any permissions on SQL Solution: Open the SQL Management Studio and run the following commands:
Store a secure string (eg. a password) localy on disk in PowerShell
Setup: A computer with PowerShell Problem: You need to run scripts which require credentials, unattended. You can store the password on the disk and load at runtime. Solution: Run this command to create a file to store the password Add these in your script to create a credential object at runtime:
Save list of all websites of IIS with PowerShell
Setup: Computer with PowerShell installed, IIS enabled Problem: You want a list will all websites and their details. Solution:
Get firewall status from server remotely with PowerShell
Setup: Computer with PowerShell installed Problem: You need to check the firewall status from a script, for a local or a remote server. Solution: Tip 1: Use Run As to open a PowerShell session with an administrative user Tip 2: Get status for all computer from AD with
Export users from Active Directory in CSV with PowerShell
Setup: You have access to a domain member computer with Active Roles installed Problem: You want to export users with details from specific OU to a CSV file Solution: Open Powershell Active Roles console and run these commands: -sizelimit 0 will return all users. See http://msdn.microsoft.com/en-us/library/ms180880(v=vs.80).aspx for more details -enabled return only enabled users. Remove […]
Batch Create AD groups from file
Prerequisites: Active Directory, PowerShell, ActiveRoles Management Shell for Active Directory Setup: You have access to a domain member computer in a Active Directory domain Problem: You have a text file with many group names and you want to create them quickly Solution: Open ActiveRoles PowerShell console and run these commands: Tips 1: If you want […]
Disable Client Certificate Revocation (CRL) Check on IIS
Setup: IIS 6/7 Problem: You want to disable Client Certificate Revocation (CRL) Check on IIS Solution: IIS 6 IIS 7 Reboot the server.