Copy file permissions with PowerShell

Setup: You want to copy all the permissions from one file to another with PowerShell Solution: Move to the folder of the source file Move to the folder of the destination file: This method is very useful for copying the permissions of .vhd files after you move/copy them between different folders/virtual machines. Before attaching a […]

Read More

SharePoint – Add a managed account from one-way trust domain

Setup. A SharePoint farm in a domain. You want to add a managed account from another domain, with one-way trust between domains. Example: DomainB TRUST DomainA. SharePoint instance is in DomainB and you want to add a managed account from DomainA. User AdminA has local admin and farm admin privileges on farm and is used […]

Read More

How to Move Active Directory FSMO roles with PowerShell

Setup: Active directory domain with many domain controllers Problem: You want to move FSMO roles to another domain controller Solution: You can move the Active Directory (AD) from the command prompt using PowerShell in just a few seconds with PowerShell. Make sure you import the Active Directory PowerShell module: Transfer all the FSMO roles at […]

Read More

Retrieve passwords from IIS Application Pool with PowerShell remotely

Setup: Server with IIS installed and a remote computer with PowerShell Problem: IIS store the Application Pool Account password un-encrypted and is trivial to retrieve it. If you want to list all application pool accounts and their passwords use the following PowerShell command. You can even scan entire network/domain and make a list will all […]

Read More