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:
All posts by dorel oprisan
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.
Get GUID of all VMs from a Hyper-V host
Setup: Hyper-V host with VMs Problem: You need a list with all VMs and their GUID Solution:
Assign permissions to Virtual Machine service account on .vhd files
Setup: Hyper-V server Problem: On a Hyper-V server and when you start the VM you get an error 12290 like this in log Microsoft-Windows-Hyper-V-Worker/Admin ‘VMName’: IDE/ATAPI Account does not have sufficient privilege to open attachment ‘\Path_to_disk\disk.vhd’. Error: ‘General access denied error’ (0x80070005). (Virtual machine ID 545CC7B7-83B6-46A9-A29C-29AB56B09306) Solution: Open an elevated command prompt and run this […]
Enable ADFS 2.0 debug log
Setup: ADFS 2.0 Federation server Problem: You need to troubleshoot some authentication issues and check the claims sent to RP Solution: Run the following command from a command prompt: Open Event Viewer, click the View menu and select Show Analytic and Debug Logs. This must be enabled for the AD FS 2.0 Tracing log to […]
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: