Those days at work I had to remove a bunch of databases from the Availability Groups and later drop them from the primary and secondary replicas. 139 more words
Tags » PowerShell
Here is what I am doing
Get-Mailbox -Identity email@example.com -erroraction stop
Write-host “User exists”
Write-host “User does not exist”
It works fine in PS 2,3,4 until I get to PS 5 where the erroraction will not work. 81 more words
Something that I had noticed a while back that I would receive some output values in my objects that shouldn’t have been there. Properties that should have been Null had values in them, and not just random values, but values that matched some of the other outputted objects. 983 more words
Today’s one liner is all about how to search file contents in Powershell, recursively. Bring on the code!
Get-ChildItem -recurse -filter *.cs | Select-String -pattern “SqlConnection” | group path | sort count | select name > sqlconnection.txt… 94 more words
Last week I was helping an Application Admin to Synchronize files and folders between Source and Destination Servers. The challenge was because some folders had really long hierarchies, so you could imagine something like this. 134 more words
This command renames the local computer to and then restarts automatically.
In my Test environment the command would be alike:
Rename-Computer -NewName “w2016DC2” -DomainCredential test.test\administrator -Restart… 97 more words