Hopefully your issue resolved with these settings.
Thursday, 15 October 2020
Internet explorer can't open while user account control is turned off in Windows Server
Hopefully your issue resolved with these settings.
Tuesday, 13 October 2020
10 Security Changes Every Sys Admin Should Implement

Every quarter a company that has been taken advantage of by a serious security event, typically ransomware or phishing, but also sometimes events more complicated. In many cases enterprise organizations have 95% of their datacenter and end user computing environments compromised. Not surprisingly, in examining these events I’ve consistently noticed that common themes are present in how they could have been mitigated. I’ve also noticed that the “security” companies and the money spent on security remediation often are not significantly improving the position of an organization. If you however take the steps below, you’ll find yourself in a much better position to dictate the security terms, rather than have them dictated to you.
Change 1: Implement a Zero-Trust End User Computing Environment
The majority of datacenter compromises happen because an individual end user computing device is compromised. That device is used to move from one end user computing device to another, then to the datacenter, until critical credentials are used to pwn the network. This is made possible because of how we’ve constructed networks for the last 20 years. The traditional network was built around the idea of creating a wall on the outside, then allowing largely free communications inside. This was the model because all the applications lived in the datacenter, with exception of very highly regulated external app vendors, like a FIS or Fiserv. We’ve now moved to a model where applications are mostly in the cloud, not hosted in the datacenter. Further, the assumption that “because a device is inside our network it is secure” is obsolete (or was never true).
This is your legacy environment. Everything talks to everything. The only way in (or so its believed) is through the corporate firewalls. Unfortunately, every device is talking through the firewalls. The assumption is that if a device is on the network, the device is “safe” and its allowed to communicate with other parties on the network.



Another view of this here, from Microsoft’s own internal implementation:

In conjunction with mitigating movement between end user computing and the datacenter applications, the same activity is important for the datacenter design. We’ve traditionally allowed threats to move between application server at will. Why? Because it is hard to implement micro-network segmentation because of the highly delineated responsibility of our teams. Fortunately, the catalyst of the movement to the cloud is changing this, because of the collapse of skills into common cloud engineering teams, SREs, and DevOps.
Similar to the previous pictures, here is one that shows the movement between applications and each other during a compromise.




Change 3: Protect Cloud Properties with Conditional Access
The cloud applications your teams are accessing are being protected not by the network your end user computing devices are on, but instead by the identity of the user. Understanding the weakness of typical passwords we realize how much we need to advance this to a stronger model. The term conditional access describes a state of combining identity, multi-factor authentication, device health, and ecosystem awareness to protect the applications.
The identity needs to be protected in conjunction with the health and risk profile of the device, especially in the zero-trust model we’ve talked about above. This is combined with protections like MFA or blocking the user.

The identity of the individual is the new control plane, leading to a vast mesh of ability to simplify the access for the company, the apps, and the user, while making security stronger.

Change 4: Have a clear identity provisioning story
What is your system of record for identity? Don’t say Active Directory. Who is accountable for the individuals that have access to your products and application platforms? They include employees, customers, and partners. Your company needs clear articulation of the system of record and process owner for your most important platforms. What determines if an employee continues to be active in your identity environment or not? In most cases it’s pretty weakly defined and even more weakly managed. Let’s fix it.
Let’s first consider the employee or contractor story. The process for provisioning should start with HR and the owner of whether an individual is an employee or not should be governed by an HR system, including employment (or contracting) start date, and end date. The digital platforms then inherit from the HR system based on role and access.

The smart organizations here realize that well thought out user provisioning and de-provisioning is the blocking and tackling of running security for the organization. To enable this with conditional access controls is expected, not a nice to have.
Change 5: End to End Kill Chain
The majority of companies I meet for the first time admit that they use less than 10% of the capabilities in their security stack well. Even more important, they’ve purchased many tools that don’t work well together, so instead of spending time improving the security position, they are spending time integrating, or dealing with conflicts, or arguing about platforms. I firmly believe that the time for buying many different non-integrated tools is over. The time for teams working together to bring automation and immediate response to the security platform will bring much more tangible results to the security of any environment. For instance, if a compromised device can immediately tell Office 365 that it should not be able to be on the network, then immediately cuts off the device from the environment, then also provides shared data to all Azure AD customers, I’d say that’s a huge win. If your security strategy is based on one tool needing to capture incidents, put them in an incident management system, then someone read it, then respond… you’re already too far behind.
Here is a best practice kill chain. You can see how every step the compromised machine is stopped. The machine cuts itself off, the other machine blocks it, Office 365 stops it, and non-identifying information is shared to other organizations to protect them too.

Change 6: Modern Product Security
People aren’t building new products on Windows domain joined virtual servers anymore. Yes, many of the current security threats attack that surface, which is why changes 1 – 5 are so important. That said, we need to protect the applications being built now, which represent the way we’re presenting our companies in the digital market. The modern platforms are built on concepts like containers, serverless, identity, and SaaS distributed architectures. These architectures are being used for internal and external applications. Your security strategy should treat every application like an application you are building to serve an external audience and understand the modern structures surrounding this.
You can see here the various layers of protection a modern app should have before it ever gives information to an internal or external user. Most apps traditionally built for an internal audience do not have even close to this number of layers and that isn’t a good thing. The lack of protection for our legacy apps represents a serious failing in how we’ve built architectures historically. A few aspects of this:
- Cloud protection with risk inputs
- App firewall characteristics
- Identity as a platform and conditional access
- Layers of exposure in your application or services
- Functions and exposure model
- Data behind the application
- Integrations into other apps and data
- Back door access that exposes the platform

Some of the considerations in modern container security include:
- Cluster design
- Container network design
- Cluster RBAC
- Security for deployment tech
- Secrets management
- Secure images & evaluation
- Runtime privileges
- Pod security
- Governance applied through ARM
- Secure coding and access models

The construction of a modern product is going to continue to evolve and move further into even more distributed architectures that leverage mult-party contracts and relationships, such as in Blockchain. The security organization needs to prepare itself for this reality.
Change 7: Policy Enforcement Based Security
With the shift of the IT organization from delivery to enablement the security organization needs to be prepared to deal with an even broader set of potential stakeholders. Many of the ways that the security organization has looked to implement policies won’t work in the modern provisioning ecosystem (some will say they’ve never worked). The IT organization is shifting to implement controls through a governable platform, but one that facilitates sufficient control. If you examine the maturity curve below, you’ll see in the middle the point where the business has implemented controls that enable the business on a cloud platform. If you aren’t there, you need to get there in short order.


Change 8: Think Content Not Storage Location
The next change is about content. Take one of your critical financial documents… how have you secured it? Have you placed it in a file share or a document library with constrained access? What happens when that document is moved out of the secure location? In most scenarios the content is now available to be used by whomever wants to use it. Now consider a modern solution that wraps content based on what it is, who is accessing it, where they are access it from, and the health of the system they are using to access it. Technologies like Microsoft Information Protection can provide this capability to a productivity environment… even finding the documents so you don’t have to.
Consider the following diagram, with content leaving the location, but still protected vs. the unprotected document.

Change 9: Data Security
We are experiencing an unprecedented opportunity to leverage data to better our companies, customers, and employees. In the same vain however we have a tremendous risk attached to implementing appropriate data governance surrounding what we expose and to whom. A few trends I’m seeing in this space that I think are important to consider:
- Understand the security categories of your data
- Understand how that secure data is used and where
- Understand how you are scoping access to the critical data
- Expose data in sets centric to the users who need it, not the entire lake
- Understand where controls can be placed over exposed data
- Understand the data controls for the platform itself
- Implement overall data controls for exposure
- Filter user experiences based on role and function
- Facilitate an understanding of how data was acquired
- Be able to audit access to critical data via platform monitoring
- Understand the modern data architecture for access
- Understand conditional access controls to data access layers
Change 10: Risk Based Management
By this I don’t mean applying an audit methodology. I mean starting with the end in mind. What do you want to prevent? What is the most likely threat? How do I prevent that threat from occuring and wondering, what should I have done? This is the root of what a CISO needs to be thinking about daily. I believe the bold CISOs are looking at the themes we identified above and assertively working to adopt technology that reduces the attack surface and architecturally mitigates threats vs. just applying minor changes. Still operating a legacy end user computing environment like most of the world? Change it. Still not doing micro-network segmentation and moving to the cloud? Change it. Still not doing conditional access for your Office 365 environment? Change it. Now is the time. Take a good, hard look at your business, understand the most likely threats, where your critical data resides, and take steps to prevent it before there is a significant disaster. Yes, we want to innovate, and we should, but if you don’t take steps to protect yourself in a serious and intentional way, you won’t make the difference necessary. Attacking change and most likely risks isn’t about training, or an external audit, or a NIST based security program. It’s about basic understanding of where risks exist and the tenacity to address them.
Monday, 5 October 2020
Understanding the PowerShell Error Variable
Terminating Errors
Non-Terminating Errors
Figure2 - Non-Terminating Error Output
ErrorAction to Stop. For example, Get-ChildItem "missing_dir" -ErrorAction 'Stop'Error Views
NormalView of the $ErrorView
preference variable. This view was standard and traditional until
PowerShell . Starting with PowerShell , the default view has changed
to what you see in Figure 2 and that is of the ConciseView.
It dispenses with much of the decoration around the output, but as you
might be able to tell, some information is not made available.The Error Object Behind the Scenes
$Error
object that is populated by PowerShell when errors are thrown. To view
this data, you are able to output and walk through the information. The
traditional way to get the last error thrown is by calling $Error[0]. This uses array notation to reference the error.As you can see there is the same error as originally shown, but we want to view more of the data. By selecting all of the properties, we are able to see what’s available. As we will talk about in the next section, the Get-Error cmdlet provides a rich view of this data, but it’s important to understand what is going on underneath.
The New Get-Error Cmdlet
Get-Error cmdlet. To expand upon the ConciseView and show far more detail, we can run the Get-Error cmdlet and see the expanded details of the last error thrown.Exception
- Type – Basic Exception Information
-
ErrorRecordMost of this information is from the
$Errorobject itself. TheTargetObject,CategoryInfo, andFullyQualifiedErrorIdare all duplicated further in theGet-Erroroutput. What is useful is theExceptiondata.- Type – An exception, but could be referencing the parent exception
- Message – The human-readable error message
- HResult – Traditional numerical error code that Windows has used since the early days of the operating system
-
ItemName – The same as the
TargetObjectshown later in theGet-Erroroutput -
SessionStateCategory – A series of values that errors fall into, this is an
enumunderneath - TargetSite – A set of information that exposes some of the internal PowerShell engine values and where the error itself is coming from
- StackTrace – This is the actual method signature of where the error itself came from and can help aid in why an error was shown
- Message – The human-readable error message
- Source – This is the source of where the error is coming from
- HResult – As discussed above, the traditional numerical error code from Windows
TargetObject
D:\\missing_dir CategoryInfo
<Error>: (<TargetObject>:<ObjectType>) [<Originating CmdLet>], <Exception Type> FullyQualifiedErrorId
FullyQualifiedErrorId is Message property of the exception object combined with the fully-qualified name of the class where the exception originated.InvocationInfo
- MyCommand – The originating cmdlet or function throwing the error
- ScriptLineNumber – Location within the file or ScriptBlock that the error is thrown
- OffsetInLine – The location within the line that the error was thrown
-
HistoryId – The location from within the
Get-Historycmdlet that the error was thrown - Line – The command throwing the error
- PositionMessage – Combined information for the error
- InvocationName – The cmdlet or function throwing the error
- CommandOrigin – In what context the error was thrown
ScriptStackTrace
line 1, but this will reflect the line of the error in the given ScriptBlock.Conclusion
Get-Error cmdlet. Furthermore, the ConciseView of the ErrorAction preference will keep the command line free from clutter and make coding even easier!Monday, 21 September 2020
Powershell Scrip to Run SCCM Action under Configuration Manager Properties
Function Run-SCCMClientAction {
[CmdletBinding()]
# Parameters used in this function
param
(
[Parameter(Position=0, Mandatory = $True, HelpMessage="Provide server names", ValueFromPipeline = $true)]
[string[]]$Computername,
[ValidateSet('MachinePolicy',
'DiscoveryData',
'ComplianceEvaluation',
'AppDeployment',
'HardwareInventory',
'UpdateDeployment',
'UpdateScan',
'SoftwareInventory')]
[string[]]$ClientAction
)
$ActionResults = @()
Try {
$ActionResults = Invoke-Command -ComputerName $Computername {param([string[]]$ClientAction)
Foreach ($Item in $ClientAction) {
$Object = @{} | select "Action name",Status
Try{
$ScheduleIDMappings = @{
'MachinePolicy' = '{00000000-0000-0000-0000-000000000021}';
'DiscoveryData' = '{00000000-0000-0000-0000-000000000003}';
'ComplianceEvaluation' = '{00000000-0000-0000-0000-000000000071}';
'AppDeployment' = '{00000000-0000-0000-0000-000000000121}';
'HardwareInventory' = '{00000000-0000-0000-0000-000000000001}';
'UpdateDeployment' = '{00000000-0000-0000-0000-000000000108}';
'UpdateScan' = '{00000000-0000-0000-0000-000000000113}';
'SoftwareInventory' = '{00000000-0000-0000-0000-000000000002}';
}
$ScheduleID = $ScheduleIDMappings[$item]
Write-Verbose "Processing $Item - $ScheduleID"
[void]([wmiclass] "root\ccm:SMS_Client").TriggerSchedule($ScheduleID);
$Status = "Success"
Write-Verbose "Operation status - $status"
}
Catch{
$Status = "Failed"
Write-Verbose "Operation status - $status"
}
$Object."Action name" = $item
$Object.Status = $Status
$Object
}
} -ArgumentList (,$ClientAction) -ErrorAction Stop | Select-Object @{n='ServerName';e={$_.pscomputername}},"Action name",Status
}
Catch{
Write-Error $_.Exception.Message
}
Return $ActionResults
}
Run-SCCMClientAction -ComputerName localhost -ClientAction MachinePolicy,DiscoveryData,ComplianceEvaluation,AppDeployment,HardwareInventory,UpdateDeployment,UpdateScan,SoftwareInventory
PowerShell Basics: How to Force AzureAD Connect to Sync

In every organization, the possibility of role changes or change of contact information can occur quite frequently. AzureAD Connect is a great tool that allows administrators to make said updates either on-premises or in cloud and will sync all changes accordingly. It can take up to 30 minutes for Azure Active Directory to update these changes when these changes are applied on the on-premises Active Directory instance and vice-versa via AzureAD Connect. It can also take up to an additional 30 minutes to then sync changes with Office 365. This post will detail steps to force AzureAD Connect to sync on command when required via PowerShell to combat the delay.
Lets begin.
- Run PowerShell
Run PowerShell
- Run the following command to install the AzureAD Sync module:
Import-Module ADSync
- Next lets review the current intervals AzureAD Connect uses to sync by running the following command.
Get-ADSyncScheduler
NOTE: The report should show intervals of 30 minute syncs and a sync policy type of Delta. A sync policy type of Initial is usually shown after AzureAD Connect's initial sync but can also be forced as detailed in the next step.
- Now run the following command to initialize the AzureAD Sync immediately.
Start-ADSyncSyncCycle -PolicyType Delta
Thursday, 17 September 2020
Domain Controller Selection
The process of a Windows client selecting an Active Directory domain controller isn't too complex but is often not fully understood. Let's look at the way a member server chooses a DC and how this affects applications.
Why it Matters
Windows will optimize connections to the best available domain controller for the following types of situations:- Authentication for users logging directly into the server
- Authentication for users accessing the applications on the server (such as SharePoint or Exchange)
- Group policy processing for user accounts and the computer account
- Promotion of a member server to a DC
How it Works
When a member server or workstation needs to find a domain controller, it goes through the following steps:- Query the primary DNS server for the all domain controller SRV records in the domain (These have the format of "_ldap._tcp.mydomain.local")
- This will return an entry for each DC in the domain. For example,
this screenshot shows the lookup result for a domain with 2 DCs, named
MGLABDC4 and MGLABDC5:

- This will return an entry for each DC in the domain. For example,
this screenshot shows the lookup result for a domain with 2 DCs, named
MGLABDC4 and MGLABDC5:
- Select the first DC in DNS result list and connect to it via LDAP
- Determine if the chosen DC is in the same site as the member
server, based on the information configured in AD Sites & Services
- If so, the member server begins using that DC for communications
- If not, the DC tells member server what site it is in
- Member server sends new DNS query for the list of DCs specifically in its own site
- Member server selects the first DC in DNS result list and connects to it via LDAP
- If no DC in the local site is available, connect to any DC in the domain
- Cache the name of the local site in the registry to speed up future operations
Here is a screenshot from a member server showing how the server is preferring the DC in its local site.

A common misconception is that Windows clients will use their configured DNS servers as their primary DCs. As you can see by the above process, this is not the case. The member server will query its configured DNS server to retrieve a list of DCs and then intelligently choose the correct DC based on the site information.
Commands to Help
To help view and diagnose how a member server is locating its DC, try the following commandsecho %logonserver% - This shows the DC that was used to authenticate and log in the current user

nltest /dsgetsite - This shows the AD site that the current server has detected that it's in

nltest /dclist: (include the colon at the end) - This shows the list of DCs in the current domain, including which site each is in. In this example, MGLABDC4 is in the MG-AZ-EASTUS site, and MGLABDC5 is in the MG-AZ-EASTUS2 site.

nslookup -type=srv _ldap._tcp.mydomain.local. - This will query the primary DNS server for all domain controller SRV records. This should return all of the DCs in the domain. In this example, MGLABDC4 and MGLABDC5 are returned.

nslookup -type=srv _ldap._tcp.mysitename._sites.dc._msdcs.mydomain.local. - This will query the primary DNS server for domain controllers that are registered in "mysitename". In this example, only MGLABDC4 is in the site that was queried, which matches the information we found with nltest /dclist: previously.

Configuration
How do you ensure that all of this happens smoothly? The single most important thing to check is that AD Sites & Services is configured correctly. You should review and confirm the following points:- All of the LAN subnets in the corporate network are defined in AD Sites & Services
- Each of those subnets is configured for the correct AD Site
- Each site with a significant number of clients has a local DC to authenticate with
Monday, 7 September 2020
How to point a client to different Domain Controller
When a logon request is made to a domain, the workstation sends out a request to find a domain controller for the domain. The domain name is actually a NetBIOS name that is a 16-character name with the 16th character used by Microsoft networking services to identify the NetBIOS type.
For some reason some clients are not working as expected or working slower and you want to point client to different domain controller. To find out if any of the domain controllers is having problems you can quickly change the domain controller that the affected client is using.
Back in the day when Windows NT 4 ruled the world there was a command called setprfdc (set preferred domain controller) nltest does something similar.
So first we wanted to find out what DC the client is using. Now there are many different ways but here is a command that generally used:
nltest /dsgetdc:domain.local
The output was:
DC: \\DC1.DOMAIN.local
Address: \\10.111.1.200
Dom Guid: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
Dom Name: DOMAIN.local
Forest Name: DOMAIN.local
Dc Site Name: Default-First-Site-Name
Our Site Name: Interxion
Flags: PDC GC DS LDAP KDC TIMESERV WRITABLE DNS_DC DNS_DOMAIN DNS_FOREST
The command completed successfully.
This means that the client is using DC1. Now we wanted quickly to point the client to a different domain controller DC2. To do that write the following command:
nltest /Server:client0 /SC_RESET:domain.local\dc2
The output was:
Flags: 30 HAS_IP HAS_TIMESERVTrusted DC Name \\DC1.DOMAIN.local
Trusted DC Connection Status Status = 0 0x0 NERR_Success
The command completed successfully
If you run the first command again you should see that domain controller has changed.
Featured post
Top 10 Rare Windows Shortcuts to Supercharge Productivity
Windows Key + X, U, U: This sequence quickly shuts down your computer. It's a great way to initiate a safe and swift shutdown without...
-
VMware client Image backups are failing with Error 10056. The Snapshot create task fails with one the following errors: ...
-
The world’s biggest chip-makers and software companies, including Intel Corp. and Microsoft Corp., are coming to grips with a vulnerabi...
-
The commands below are PowerCLI commands used to automate VMware ESX and VirtualCenter at the command prompt. Most of these commands w...







