Setup: You have a SharePoint farm with web applications configured to use a Trusted Identity Provider aka. ADFS 2.0 Problem: The signing certificate of Trusted Identity Provider expired and you need to change it. Solution: Run these commands in SharePoint Shell on SharePoint server: Note. Replace ADFS from ?{$_.name -match “ADFS“} with the name of […]
Articles Tagged: PowerShell
Add new realm to existing trusted identity provider in SharePoint 2010/2013
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 […]
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:
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 […]
ADFS 2.0 Copy claim rules from one Relying Party to another
Setup: Existing ADFS 2.0 setup Problem: You create a new Relying Party Trust and want to copy all the claim rules from similar RP Solution: Open PowerShell console and run this code After that issue the folowing command: Tips: Run this command to find out all RP names:
Copy group membership with Powershell
Problem: You have a group in Windows Active Directory and you want to create a new group with same member like the existing one Solution: Prerequisites: member server in Active Directory domain, Quest Powershell tools Tips: – Use Run As to run Powershell under another identity in case your account does not have the right permissions. […]