After you’ve added a domain to Azure AD (or Office 365) using powershell, while connected to your ADFS like this:
New-MsolDomain -Name domaintest.wrish.com -Authentication Federated When you add your verification record and try to verify the domain from the GUI you might get an error like this:
You can’t verify your domain using the GUI when you create the Domain using powershell, instead you have to confirm the domain using powershell while entering all Federation options.
You’ve built a Windows server without the GUI (Server Core only). You’re thinking, I use the command line all the time, this will be easy. It won’t. This cheat sheet has a few useful bits and pieces on how to configure it.
#Force Windows Updates (New-Object -ComObject Microsoft.Update.AutoUpdate).DetectNow() #Dump the network interface config (to edit it) netsh interface dump > netcfg.dat #edit the config notepad netcfg.dat #Restore the interface config netsh exec netcfg.
A collection of regex’s that I always find myself looking up.
#Match while tagging match groups 'CowColour Brown' -match '(?<Attribute>\w+) (?<Value>\w+)' | out-null $matches.Attribute $matches.Value #cowColour #Brown #Matching groups - your $matches object will have properties containing the valid matches "Subnet:10.1.1.0/24" -match 'Subnet:(?<SiteSubnet>(?:\d{1,3}\.){3}\d{1,3}/\d+)' #Replace to reformat a string 'This is a wild test' -replace '.*(w[^ ]+).*','Not so $1' #Not so wild #Lazy matching (to prevent over-matching) use a ? after the + or * "<h1>MyHeading</h1>" -replace '<([^/]+?
I was building a lab in Azure today and needed to download the Exchange binaries to extend my test AD schema.
When you open up IE and browse to the Microsoft download site you have to add a list of 10 or 15 different sites to trusted - some of them are CDNs for shared Javascript code and resources. https://cdn.optimizely.com https://c.s-microsoft.com https://query.prod.cms.rt.microsoft.com https://mem.gfx.ms and then… Your current security settings do not allow this file to be downloaded sigh!
Perhaps you’ve done an ADRAP and youve got an item about Conflict and Deleted having some latent files. You found the AskDS entry about Manually Clearing the ConflictAndDeleted Folder in DFSR. But they use ugly WMIC commands, you want to use PowerShell, because PowerShell is awesome.
get-addomaincontroller -filter * | %{ Get-WmiObject -Namespace "root/microsoftdfs" -class dfsrreplicatedfolderinfo -ComputerName $_.hostname } | ?{$_.replicationGroupName -eq "Domain System Volume"} | %{$_.cleanupConflictDirectory()}
I work in Directories, usually lots of them at the same time. Spend a little time comparing the same user in 3 or 4 different directories and you long for a way to show them side by side. The Compare-Object cmdlet is handy for comparing lists of files but actually compare objects it does not!
You have two or more objects, one works, one does not, you want to find out what is different between the two - this cmdlet is for you!
You are a Windows Systems Administrator, you trawl through logs, compare datasets, peruse help files and you use PowerShell, but once, you were a Linux System Administrator and you revelled in tools like sed and grep. Perhaps you were looking for a way to replicate the glorious grep –color command, perhaps you found Wes’s Puzzling Blog for Highlighting Strings and What Have You. But for some reason, it didn’t quite cut it.