Occasionally at work I need to work out what the sale price / retail price will be for something would be (given that I know the cost and the % margin). That’s easy to work out. But sometimes I get given the sell / retail price and I know the margin used, and I then must work out what the cost will be.
Ordinarily if it’s a quick question I’ll just use and online margin calculator. But if I have a LOT of items to price – then Excel is the way to go.
Solution: Working out the Sell Price
If you know the cost and the margin to be applied, this is how to work out the retail price.
Solution: Working out the Cost Price
If you know the retail (Sell) price and the that was applied, this is how to work out the cost price.
Related Articles, References, Credits, or External Links
Special thanks to Mr Andrew Dorrian, who worked out the formula for the ‘cost price’ while I swore a lot!
The purpose of BranchCache is, (as the name implies) to cache files in branch sites, without the need for a local file server or DFS. There are essentially two deployment models, In Hosted Mode a server in the branch caches the files locally as they are requested by clients.
This works because the main file server provides a hash of the requested file, the branch server will download it, and if another client asks for the same file it can check the hash on it’s local copy to see if it’s been updated, if not it serves the file locally without the need to be downloaded again. As the branch connections are typically slower, this makes things a lot more efficient.
Note: You cannot deploy BranchCache on a RODC domain controller.
But what if there is no server onsite? Then you can use Distributed Mode, where every client can download and cache a copy, then the clien’s serve the files to each other.
Solution
Deploy The Main Office BranchCache File Server.
BrachCache for Network Files is a server role, select it and complete the Wizard.
You can carry out the following procedure with domain group policy, but it’s just as easy to setup in local group policy, on the file server. Windows Key + R > gpedit.msc > Computer Configuration > Administrative Templates > Network > Lanman Server > Hash Publication for Branch Cache.
Enable the policy and set to Allow hash publication for all share folders > Apply > OK.
Note: You have enabled Hashing for ‘All shares ‘so the next step is a moot point. If you selected ‘Allow hash publication only for shared folders on which BrancCache is enabled’, then you would definitely need to do the following!
Now on the ‘Shares’ select the caching option.
Enable BranchCache.
Now I’ve created a Domain Group Policy called ‘BranchCache Firewall Policy’. Because to serve files you need to enable a couple of pre-configured firewall rules.
Computer Configuration > Policies > Windows Settings > Security Settings > Windows Firewall with Advanced Security > Inbound Rules > Add Rule.
Enable the pre-configured rule for ‘BranchCache – Content Retrieval (Uses HTTP).
Repeat the procedure and also add a rule for ‘BrachCache – Peer Discovery (Uses WSD)’.
Deploy The Branch Office ‘Hosted BranchCache’ Server.
Just as you did at the main office, install the ‘Brach Cache for Network Files’ Role.
But this time install the additional BrachCache Server Feature.
The server will be serving files, so link the ‘BranchCache Firewall Policy‘ to the OU that contains the branch server. Then to start it servicing files, issue the following command;
[box]Enable-BCHostedServer -RegisterSCP[/box]
To make sure it’s running;
[box]Get-BCStatus[/box]
Ensure ContentServerIsEnabledhas been set to ‘True‘.
If you scroll to the bottom of the output, you can see where the cache is going to live, and what ‘percent’ of the drive size it can grow to. You can change these two values.
To Move BrachCache Folder Location
In this example I’ve got a volume on my Branch server, and I’ve created a folder on there to store my cached files in.
If your client machines are going to serve BranchCache files, you will need to link the ‘BrachCache Firewall Policy‘ you created above to the OU that contains the client PC’s in the branch site.
Create a new policy and link it to the OU that your branch client PC’s are in.
I’ve covered setting up NDES at length in the past, but what happens when your issued certificates expire? If you are using them for all your VPNs what then? Well thankfully you can get your devices to automatically re-enroll and before they expire, for example to renew the cert at 80% of its lifetime you would use the following;
However, there is a problem, if you are using Server 2008 there’s a hot-fix (and you need to make the following change as well) I’m on Server 2012 and mine was failing.
Solution
1. On the server running the NDES Server role > Open the registry editor and navigate to;
Create a new 32bit DWORD Value called DisableRenewalSubjectNameMatch and set its value to 1 (one).
2. Also ensure the certificate that you are using or NDES, has the following settings, here I’m using a custom template called NDESTemplete, If you are using the default one it will be called ‘IPSec (Offline request)‘. On the Subject Name tab make sure ‘Supply in the request’ is selected.
3. On the ‘Issuance Requirements’ tab, ensure ‘CA certificate manager approval’ is NOT selected.
Related Articles, References, Credits, or External Links