-
Convert object in PowerShell (for example [PsCustomObject]) into hash table source code
I needed a simple and reusable PowerShell code to convert any object into hash table that can be copy and pasted as source code. I wrote this: $outputItem = ‘@{‘ $MyCustomObject.PSObject.Properties.Name | Where-Object -FilterScript { $_ -ne ‘ComputerName’ } | ForEach-Object -Process ` { if ($interfaceItemIpConfigurationItem.$_ -is [bool]) { $valueItem = ‘${0}’ -f $MyCustomObject.$_.ToString().ToLower() }…
-
Building highly available shares, DFS namespaces and replication topology (DFS-R) – Part 5 – DFS Replication
At this moment client is able to access one of the defined shares on one of the defined File Server but the data are not consistent because replication was not configured yet. It is also possible to configure DFS-R for directories that are not included in DFS Namespace but the following guide describe DFS Namespace with…
-
Building highly available shares, DFS namespaces and replication topology (DFS-R) – Part 4 – What is replication? How DFS-R works? Can I use it as backup?
Backup All types of replication (file replication – DFS-R, Hyper-V Replica, Volume replication – vNext) are not a backup. The reason is that if you do a mistake then the mistake is replicated to all servers. Replication is great for disaster recovery (DR) when for example a plane crash on your datacenter. Replication is also great…
-
Building highly available shares, DFS namespaces and replication topology (DFS-R) – Part 3 – DFS Namespaces
In order to ensure highly availability of the namespaces It is a good practice to have multiple servers that holds DFS Namespaces. It is a common practice to add DFS Namespace role to existing servers (for example Domain Controllers or existing File Servers) but Contoso’s administrators will use the best practice and they will use…
-
Building highly available shares, DFS namespaces and replication topology (DFS-R) – Part 2 – File Servers
In the previous articles I described how to configure File Server role in a Windows Server cluster. For this setup I will choose standard standalone File Server in each site but of course it is possible to follow previous articles and build a cluster in each site. Virtual machine File Servers are VMs that run…