Showing posts with label IT. Show all posts
Showing posts with label IT. Show all posts

Thursday, 27 March 2025

Azure MFA NPS Extension Configuration Failure Due to Microsoft Graph PowerShell Module Conflicts

Introduction

When configuring the Azure MFA NPS Extension using the official script (AzureMfaNpsExtnConfigSetup.ps1), administrators may encounter a failure during the update of the Azure Active Directory service principal. The script attempts to push certificate data using the Microsoft Graph PowerShell SDK, and the process fails with the following error:

Update-MgServicePrincipal : Cannot convert the literal '<cert_blob>' to the expected type 'Edm.Binary'.
Status: 400 (BadRequest)

This issue typically occurs due to multiple versions or conflicting installations of the Microsoft Graph PowerShell modules, which can lead to serialization or data formatting errors during API operations.

This KB provides a tested remediation process by removing all existing Graph modules and reinstalling the required components cleanly.

Instructions

✅ Step 1 – Manually Uninstall All Microsoft.Graph Modules

Open PowerShell as Administrator and run the following script to uninstall all installed versions of any Microsoft.Graph modules:

$Modules = Get-Module Microsoft.Graph* -ListAvailable | Where {$_.Name -ne "Microsoft.Graph.Authentication"} | Select-Object Name -Unique
Foreach ($Module in $Modules)
{
    $ModuleName = $Module.Name
    $Versions = Get-Module $ModuleName -ListAvailable
    Foreach ($Version in $Versions)
    {
        $ModuleVersion = $Version.Version
        Write-Host "Uninstall-Module $ModuleName $ModuleVersion"
        Uninstall-Module $ModuleName -RequiredVersion $ModuleVersion
    }
}

# Uninstall Microsoft.Graph.Authentication
$ModuleName = "Microsoft.Graph.Authentication"
$Versions = Get-Module $ModuleName -ListAvailable
Foreach ($Version in $Versions)
{
    $ModuleVersion = $Version.Version
    Write-Host "Uninstall-Module $ModuleName $ModuleVersion"
    Uninstall-Module $ModuleName -RequiredVersion $ModuleVersion
}

After the script completes, manually rerun it until this command returns no results:

Get-InstalledModule | Where-Object { $_.Name -like "Microsoft.Graph*" }

📝 Note: Some modules may be reloaded or may not uninstall cleanly on the first attempt, especially if there are versioning or dependency overlaps. Repeating the uninstall step ensures a clean removal.

✅ Step 2 – Install Required Microsoft Graph Modules

Once all previous versions are removed, install only the latest required modules:

Install-Module Microsoft.Graph

✅ Step 3 – Rerun the Configuration Script

With a clean module set installed, rerun the configuration script:

C:\Program Files\Microsoft\AzureMfa\Config\AzureMfaNpsExtnConfigSetup.ps1

The script should now complete successfully, allowing Azure MFA to integrate with the NPS service and Remote Desktop Gateway.

Additional Notes

This issue has been independently reported in the sysadmin community and is reproducible in environments where Microsoft Graph modules are upgraded over time without cleanup.

No interference was found from Microsoft Defender in typical environments, though exclusions may still be useful in some configurations.

Tuesday, 11 March 2025

Transition from LBFO to SET in Windows Server 2022 for Hyper-V Networking

Load Balancing and Failover (LBFO) refers to the traditional NIC Teaming feature in Windows Server that allows multiple physical network adapters to act as one for load distribution and redundancy. Switch Embedded Teaming (SET) is a newer technology introduced in Windows Server 2016 that integrates NIC teaming directly into the Hyper-V virtual switch​ (Link). The key difference is that LBFO is an independent teaming mechanism at the host level, whereas SET is built into the Hyper-V switch itself (hence “switch embedded”). Microsoft has shifted toward SET for Hyper-V environments because it simplifies the stack and enables advanced capabilities (like RDMA and faster VM networking) not possible with LBFO. Starting with Windows Server 2022, a Hyper-V virtual switch cannot be bound to an LBFO team – it must use a SET team​(Link). (In other words, LBFO is deprecated for Hyper-V networking.) This change was made to improve performance and support new features. For example, SET allows teaming on RDMA-capable NICs and even guest RDMA, as well as features like Dynamic Virtual Machine Queue (Dynamic VMMQ)​(Link), which were not supported with the older LBFO approach. In summary, Microsoft now recommends using SET for Hyper-V networking because it provides better integration with the hypervisor and future-proofs the environment.

Differences between LBFO and SET: LBFO (the older NIC Teaming) offered more flexibility in some ways – it could team a larger number of NICs (in Windows Server 2019/2022, up to 32 adapters could be in one LBFO team) and had no strict requirement that NICs be identical. SET, on the other hand, supports a maximum of 8 physical NICs in a team​(Link) and requires the adapters to be symmetric (same make, model, speed, and configuration) for best results​(Link). Another difference is in teaming modes: LBFO supports various teaming modes including Switch Dependent options (like LACP or static link aggregation) and Switch Independent mode. SET only supports Switch Independent mode, with the Hyper-V switch handling the distribution of traffic​(Link). This means features like LACP are not available with SET, but this simplification reduces complexity in Hyper-V scenarios. In practice, LBFO allowed teaming across mixed adapters and multiple switches, whereas SET requires a uniform set of NICs and is designed to work with the Hyper-V virtual switch exclusively. Microsoft’s decision to shift to SET for Hyper-V reflects the aim to streamline networking for virtualization and enable high-performance features (e.g. SET is the only supported teaming method for new software-defined networking scenarios and Azure Stack HCI). While LBFO was mature and stable, it will not see new improvements for Hyper-V usage (it remains supported only for non-virtualization scenarios). The move to SET ensures Hyper-V networks can leverage modern networking enhancements that the older LBFO teaming could not support.

Workload Support in Windows Server 2022

It’s important to distinguish which scenarios still support LBFO versus those that require SET in Windows Server 2022:

  • Non-Hyper-V Workloads (Physical/Standalone Roles): Traditional LBFO NIC Teaming is still fully supported for non-Hyper-V scenarios in Windows Server 2022​ (Link). This means if you have a file server, SQL server, or any standalone server role that benefits from NIC teaming for higher availability or throughput (and not using a Hyper-V virtual switch), you can continue to use LBFO as before. The LBFO management UI and PowerShell (New-NetLbfoTeam, etc.) are still present for these use cases. For example, teaming NICs for a standalone cluster heartbeat network or a general active/passive failover team on a physical server is allowed with LBFO.

  • Hyper-V and Virtualization Workloads: Any scenario involving a Hyper-V virtual switch (i.e. networking for virtual machines) must use Switch Embedded Teaming (SET) in Windows Server 2022. The Hyper-V virtual switch will not bind to an LBFO team interface in this release​(Link). If you attempt to create an External vSwitch on an existing LBFO NIC team, it will be blocked (the Hyper-V Manager GUI in 2022 will throw an error, as LBFO for vSwitch is deprecated). Instead, the NIC teaming for Hyper-V needs to be done via SET as part of the vSwitch creation. This applies to Hyper-V hosts and scenarios like Software Defined Networking (SDN) or Azure Stack HCI as well. (For instance, Azure Stack HCI and other SDN solutions only support SET for host teaming, not LBFO​(Link).) In summary, any workload involving virtual machine networking in WS2022 requires SET, whereas LBFO is reserved for legacy purposes outside of virtualization.

To put it simply: Use LBFO for non-virtualized roles; use SET for Hyper-V hosts. Microsoft’s support stance reflects this – the change “only applies to Hyper-V” and LBFO remains supported for other scenarios​(Link), but if you’re running Hyper-V, the recommended and supported teaming method is SET.

SET Teaming Configuration (PowerShell Steps)

Configuring a Switch Embedded Teaming team for Hyper-V in Windows Server 2022 can be done with PowerShell. Below are step-by-step instructions to set up a SET team optimized for Hyper-V, incorporating Microsoft’s recommendations for performance tuning:

  1. Plan and Prepare – Identify the physical NICs on the Hyper-V host that will form the SET team. Ensure these NICs have identical link speed and capabilities (it’s best if they are the same model and firmware) because SET requires symmetric adapters for optimal performance​(Link). For example, if you plan to team two 10 GbE adapters for your virtual switch, verify both are from the same vendor/model and running at 10 Gbps. Also ensure no existing LBFO team is configured on them; the physical NICs should be standalone and enabled.

  2. Create the Hyper-V Switch with Embedded Teaming – Use the New-VMSwitch cmdlet to create a new external virtual switch and specify multiple NICs for the -NetAdapterName parameter. This will automatically create a SET team as part of the switch. For example:

    New-VMSwitch -Name "HyperV-TeamSwitch" -NetAdapterName "NIC1","NIC2" -AllowManagementOS $true -EnableEmbeddedTeaming $true

    In this command:

    • "HyperV-TeamSwitch" is the name of the new virtual switch (you can choose any friendly name).
    • -NetAdapterName "NIC1","NIC2" specifies the two physical network adapters to team. Replace "NIC1","NIC2" with the actual interface names of your adapters (as shown by Get-NetAdapter). You can list up to 8 NICs here for a SET team (the limit supported by SET)​(Link).
    • -AllowManagementOS $true (optional) allows the host OS to share this NIC team for management traffic. Include this if you want the Hyper-V host itself to have an IP on the teamed interface (commonly true if this team also carries host management or cluster traffic).
    • -EnableEmbeddedTeaming $true explicitly tells Hyper-V to create an embedded team. (Note: When you provide multiple NICs, PowerShell treats it as a SET team automatically. This switch is a safeguard, especially if using one NIC now and adding others later.)

    This single command replaces the old multi-step process of creating an LBFO team then attaching a vSwitch. It creates the virtual switch and teams the NICs in one step, since the teaming is integrated into the switch with SET. After running New-VMSwitch, you should have a new vSwitch visible (e.g., in Hyper-V Manager or via Get-VMSwitch) and the physical NICs will be part of the switch’s team.

  3. Optimize Load Balancing Algorithm – By default, a SET team uses the Dynamic load-balancing algorithm​(Link), which in many cases is fine. However, Microsoft documentation recommends using the Hyper-V Port algorithm for best performance on high-speed adapters (10 Gbps and above)​(Link). Depending on your workload and NIC speed, you may want to set the algorithm to HyperVPort. You can configure this using the Set-VMSwitchTeam cmdlet. For example:

    Set-VMSwitchTeam -Name "HyperV-TeamSwitch" -LoadBalancingAlgorithm HyperVPort

    This command changes the team named "HyperV-TeamSwitch" to use Hyper-V Port mode for load balancing. (The TeamingMode is implicitly SwitchIndependent for SET and cannot be changed – SET doesn’t support LACP​(Link), so no need to specify the teaming mode.) The Hyper-V Port algorithm distributes network traffic based on the virtual switch port (essentially per-VM distribution). This mode ensures each VM’s traffic is affinitized to a particular physical NIC, which can improve throughput consistency and avoid packet reordering on 10 GbE+ networks​(Link). If your host has many VMs or you are using very fast NICs, Hyper-V Port mode is often beneficial. On the other hand, Dynamic mode (the default) uses a combination of port and flow hashing to spread traffic and can yield better NIC utilization in some scenarios (it attempts to use all team members for outbound traffic). You should choose the mode based on Microsoft’s best practices: Hyper-V Port for 10 Gbps or higher NICs (and many VMs), Dynamic for general purpose or lower-speed networks​(Link)(Link). You can always adjust this setting with Set-VMSwitchTeam after initial setup.

  4. (Optional) Additional Tuning – If your deployment requires features like SR-IOV or RDMA, ensure to configure those on the vSwitch at creation. For SR-IOV, include -EnableIov $true in the New-VMSwitch command (assuming your adapters support SR-IOV). For RDMA on a SET, make sure the physical NICs support RDMA and consider using Set-VMNetworkAdapter to enable Virtual RSS (vRSS) on the VM adapters for better scalability of network processing. Also verify that features like Virtual Machine Queue (VMQ) are enabled on each physical NIC. In Windows Server 2022, these are usually enabled by default when using SET, but it’s good to double-check (you can run Get-NetAdapterVmq on each team member). The goal is to follow Microsoft’s performance tuning guidance for Hyper-V networking: enable offloads and virtualization features that are compatible with SET. (SET inherently allows Dynamic VMMQ, which automatically distributes incoming VM traffic processing across multiple CPU cores, improving performance on high throughput links​(Link).)

By following the above steps, you will have created a Hyper-V switch that uses Switch Embedded Teaming under the hood, providing both redundancy and load balancing for your Hyper-V host’s networking. This configuration is fully supported in Windows Server 2022 and aligns with Microsoft’s recommended practices for Hyper-V networking.

Hyper-V Port vs. Dynamic Load Balancing Modes in SET

When using SET, there are two load balancing algorithms available for distributing traffic across the teamed NICs: Hyper-V Port and Dynamic(Link). Understanding these modes and when to use each is important for optimizing network performance on Hyper-V hosts:

  • Hyper-V Port Mode: In this mode, each virtual switch port (which typically corresponds to a VM’s virtual network adapter, or the host’s management vNIC) is tied to a specific physical NIC in the team. All traffic for a given VM will egress through one team member interface (though inbound traffic to the host is automatically balanced by the Hyper-V switch across NICs based on VM port as well). This one-VM-to-one-NIC mapping ensures no single VM’s traffic is split across multiple physical NICs. The benefit is that it avoids potential issues with out-of-order packets and is easier on upstream switches (each VM’s MAC/IP consistently comes from one NIC, preventing “flapping”). Microsoft notes that Hyper-V Port is often the best choice for high-bandwidth networks – specifically, it is recommended for NICs 10 Gbps or faster to achieve optimal performance​(Link). In environments with many VMs, Hyper-V Port mode naturally spreads the VMs across the physical NICs (e.g. one VM’s traffic on NIC1, another on NIC2, etc.), achieving load distribution at a per-VM level. Use Hyper-V Port mode if you have very fast adapters or if you’ve observed better stability with it in your network. It’s particularly suited for scenarios where each VM can generate significant traffic on its own, as it guarantees that VM can use up to one NIC’s worth of bandwidth without interference from load-balancing algorithms.

  • Dynamic Mode: Dynamic is a more complex algorithm that combines elements of both outbound flow-based distribution and inbound port-based distribution. In practical terms, Dynamic mode will distribute outgoing traffic across the team NICs based on flow hashing, and still use Hyper-V Port for inbound traffic to ensure stability. Microsoft set Dynamic as the default load balancing algorithm for SET teams​(Link) because it aims to utilize all NICs efficiently even if a single VM is very busy. For example, if one VM’s traffic is heavy, dynamic mode can spread different TCP streams (flows) from that VM across multiple NICs, potentially exceeding the throughput of a single NIC. This can maximize aggregate bandwidth (as seen in some cases where dynamic mode allowed using the full team bandwidth). Dynamic mode is generally recommended by Microsoft for most scenarios since it provides a good balance of load distribution. However, it can be more sensitive to switch configurations – because multiple NICs may carry traffic for the same VM or IP, your physical switch (if not in a stable configuration for independent teaming) might log MAC address moving or “IP flapping” alerts. In a properly configured Switch Independent scenario (no EtherChannel/LACP on the switch ports), dynamic mode should work well. Use Dynamic when you want the team to automatically balance traffic and you have relatively moderate NIC speeds (1 GbE or 10 GbE where each VM alone might not saturate a NIC). It’s the default for a reason: in many deployments it yields the best overall throughput distribution across a team.

Best Practice: For Windows Server 2022 Hyper-V, start with the default Dynamic mode, but consider switching to Hyper-V Port mode on hosts with 10 GbE or higher NICs, or if you encounter stability issues with dynamic. Microsoft’s official guidance suggests Hyper-V Port on >=10 Gbps networks for best performance​(Link), as mentioned. Remember that in all cases with SET, the teaming mode is always Switch Independent (the physical switch does not need special configuration)​(Link), so these algorithms operate at the host level. If you change the algorithm with Set-VMSwitchTeam, the change takes effect immediately and you can monitor performance to decide which works better for your environment. Both modes will provide fault tolerance (failover to the remaining NIC if one fails), so the choice mainly impacts load balancing behavior.

Verification Steps for SET Configuration

After setting up a SET team for Hyper-V, you should verify that the configuration is correct and optimized as intended. Use the following PowerShell commands and checks to confirm a successful deployment:

  • List the Virtual Switch and Team Members: Run Get-VMSwitchTeam -Name "<SwitchName>" to retrieve information about the switch’s team. For example:

    Get-VMSwitchTeam -Name "HyperV-TeamSwitch"

    This command will display the details of the SET team associated with the switch “HyperV-TeamSwitch.” You should see output listing the Team Members (the physical NICs in the team), the TeamingMode (which will show as SwitchIndependent), and the LoadBalancingAlgorithm (Dynamic or HyperVPort, depending on what you configured)​(Link)(Link). Verify that all expected NICs are present in the team and that the load-balancing mode matches your intended setting. For instance, if you set Hyper-V Port mode for performance, ensure the output shows LoadBalancingAlgorithm : HyperVPort. If anything is incorrect, you can re-run the Set-VMSwitchTeam command to adjust settings.

  • Check the Virtual Switch Properties: You can also run Get-VMSwitch -Name "<SwitchName>" | Format-List * to see detailed properties of the virtual switch. In the detailed output, confirm that AllowManagementOS is set to True (if you intended the host to have access), and look at the NetAdapterInterfaceDescription or NetAdapterName field which should list the teamed adapters. This confirms the switch is indeed bound to the multiple physical adapters (indicating a SET team). Additionally, the SwitchType should be External (for an external vSwitch). While this cmdlet doesn’t explicitly enumerate team members as clearly as Get-VMSwitchTeam, it’s useful for checking that the switch was created with the correct parameters.

  • Validate NIC Status: Ensure all physical NICs in the team are up and functioning. Use Get-NetAdapter -Name "<NIC1>","<NIC2>" to check the link status and speed of each member NIC. Each should show Status: Up and the expected LinkSpeed (e.g., 10 Gbps). If a NIC is down or has a mismatched speed, the team may not perform optimally. All team members should be connected to the appropriate switch ports with identical configurations (no VLAN set on one and not the other, etc.). Remember that SET requires symmetric configuration on the NICs​(Link), so any discrepancy here should be fixed at the network or adapter level.

  • Test Connectivity and Failover: Although not a PowerShell one-liner, a practical verification is to ensure that VMs and the host (if applicable) have network connectivity through the new SET switch. You can create or attach a test VM to the “HyperV-TeamSwitch” and assign it an IP to ping out. Try disconnecting one of the physical NIC cables (or disabling one NIC) and ensure traffic continues on the remaining NIC (the ping should continue without dropping more than a packet or two during failover). This tests the failover aspect of the team. For load balancing verification, you might monitor the NIC traffic counters (using Performance Monitor or Get-NetAdapterStatistics) while generating load from multiple VMs to see that both NICs in the team are carrying traffic. This is more of a manual test, but it confirms that the SET team is functioning as expected in both load balancing and redundancy.

  • Review Event Logs (if needed): The Hyper-V Virtual Switch will log events if something is misconfigured. After setting up, check the System event log for any Hyper-V Networking or VMSMP warnings/errors. For example, an event about “an LBFO team may not be attached” would indicate an attempt to use LBFO where not supported (which our configuration avoids by using SET). No such errors should be present if the SET team is correctly configured for the vSwitch.

By performing the above verification steps, you can be confident that the transition to SET was successful. The Get-VMSwitchTeam output is the clearest confirmation – it shows that your Hyper-V switch is indeed using SET with the intended NICs​(Link). You should see SwitchTeam information indicating SwitchIndependent mode and either Dynamic or HyperVPort load balancing (with all members listed). This confirms you’re using the supported configuration on Windows Server 2022 (since an LBFO team would not appear here – instead, Get-NetLbfoTeam would list it if one existed, but in our case we bypass LBFO). Once verified, your Hyper-V host’s networking is now running on Switch Embedded Teaming, which is the Microsoft-endorsed solution moving forward. This ensures you can take advantage of the latest Hyper-V networking performance features and that you’re in line with the support policy for Windows Server 2022 Hyper-V​(Link).

Sources:

  • Microsoft Docs – Features removed or deprecated in Windows Server 2022: Hyper-V switch no longer supports LBFO teams​.
  • Microsoft Docs – Windows Server Supported Networking Scenarios: Introduction of Switch Embedded Teaming (SET) for Hyper-V and SDN​.
  • Microsoft Docs – Azure Stack HCI Networking (Host network requirements): SET overview and requirements (symmetric NICs, up to 8 adapters, supported algorithms)​.
  • Microsoft Docs – Hyper-V PowerShell Reference: Set-VMSwitchTeam parameters (SwitchIndependent only, LB algorithms HyperVPort/Dynamic)​.
  • Microsoft Docs – Hyper-V PowerShell Reference: Using Get-VMSwitchTeam to view SET team members​

Sunday, 12 January 2025

Integrating BBC RSS Feed into Home Assistant Dashboard Using Feedreader

Integrating BBC RSS Feed into Home Assistant Dashboard Using Feedreader

To display the latest news item from the BBC RSS feed on your Home Assistant dashboard using the feedreader integration, follow these steps:

1. Add the Feedreader Integration via the Home Assistant UI:

  1. Navigate to Settings > Devices & Services.
  2. Click on Add Integration.
  3. Search for and select Feedreader.
  4. When prompted, enter the RSS feed URL:
    • https://feeds.bbci.co.uk/news/rss.xml?edition=uk
  5. Complete the setup by following the on-screen instructions.

2. Create Helper Entities:

You'll need to create helper entities to store the title, description, link, and publication date of the latest news item.

  1. Navigate to Settings > Devices & Services > Helpers.
  2. Click on Create Helper and select Text.
    • Name it Newsitem Title.
    • Repeat this process to create two more text helpers named Newsitem Description and Newsitem Link.
  3. Create a Datetime helper:
    • Name it Newsitem Date Time.

3. Set Up Automation to Process New Feed Entries:

Create an automation that updates the helper entities when a new feed entry is detected.

  1. Navigate to Settings > Automations & Scenes.
  2. Click on Create Automation and choose Start with an empty automation.
  3. Configure the automation as follows:

    Trigger:

    • Trigger Type: Event
    • Event Type: feedreader
    • Event Data:
      • feed_url: https://feeds.bbci.co.uk/news/rss.xml?edition=uk

    Actions:

    • Action Type: Call Service
      • Service: input_text.set_value
      • Target: input_text.newsitem_title
      • Value: {{ trigger.event.data.title }}
    • Add similar actions for input_text.newsitem_descriptioninput_text.newsitem_link, and input_datetime.newsitem_date_time, setting their values to {{ trigger.event.data.description }}{{ trigger.event.data.link }} and {{ trigger.event.data.published }}, respectively.

4. Add a Markdown Card to Your Dashboard:

To display the latest news item on your dashboard, add a Markdown card with the following content:

  1. Navigate to your dashboard and click on Edit Dashboard.
  2. Click on Add Card and select Markdown.
  3. In the Content field, enter:
    **[{{ states('input_text.newsitem_title') }}]({{ states('input_text.newsitem_link') }})**
    
    {{ states('input_text.newsitem_description') }}
    
    _Published on: {{ as_datetime(states('input_datetime.newsitem_date_time')).strftime('%B %d, %Y %H:%M') }}_
  4. Click Save to add the card to your dashboard.

5. Test the Setup:

To test without waiting for a new RSS feed entry, you can simulate a feedreader event using the Developer Tools:

  1. Navigate to Developer Tools > Events.
  2. In the Event field, enter feedreader.
  3. In the Event Data field, input a JSON object that mimics the data structure of a real feed entry, for example:
    {
      "feed_url": "https://feeds.bbci.co.uk/news/rss.xml?edition=uk",
      "title": "Sample News Title",
      "description": "Sample news description.",
      "link": "https://www.bbc.co.uk/news/sample-news",
      "published": "2025-01-12T13:32:46+00:00"
    }
  4. Click Fire Event to simulate the event.
  5. Check if the helpers are updated accordingly.

After setting up, check the Logs under Settings > System > Logs to ensure there are no errors related to the feedreader integration or the automation.

By following these steps, your Home Assistant dashboard will display the latest news item from the BBC RSS feed using the feedreader integration.

Friday, 20 December 2024

Search for an IP Address in the Last 7 Days of Windows Security Event Logs

This PowerShell script allows you to filter Windows Security event logs for a specific IP address, focusing on events from the past 7 days. The results are saved to a CSV file for further analysis.







The Script

# Define the IP address and output CSV file path $ipaddress = "10.1.1.1" $outputFile = "C:\SecurityEvents_Last7Days.csv" # Define the start date (7 days ago) $startDate = (Get-Date).AddDays(-7) # Extract the events from the last 7 days and export to CSV Get-WinEvent -LogName Security -FilterXPath "*[EventData[Data[@Name='IpAddress']='$ipaddress']]" | Where-Object { $_.TimeCreated -ge $startDate } | Select-Object TimeCreated, Id, Message | Export-Csv -Path $outputFile -NoTypeInformation -Encoding UTF8 # Notify user of completion Write-Output "Events from the last 7 days successfully exported to $outputFile"

Key Features

  1. Filters by IP Address: Searches for events where the IP address matches the specified value.
  2. Time Range: Limits results to events that occurred in the last 7 days using the TimeCreated property.
  3. CSV Output: Saves event details (timestamp, ID, and message) to a specified CSV file.

How to Use It

  1. Replace 10.1.1.1 with the target IP address.
  2. Save the script to a .ps1 file or run it directly in PowerShell with administrator privileges.
  3. Locate the output file (C:\SecurityEvents_Last7Days.csv) for review.

Script Workflow

  1. Input Definition: The $ipaddress variable holds the IP address, and $outputFile specifies the CSV file location.
  2. Time Range Setup: $startDate is calculated as 7 days prior to the current date.
  3. Event Filtering: Get-WinEvent retrieves log entries matching the IP address. Where-Object ensures only events from the past 7 days are included.
  4. Data Export: Selected details are saved to the CSV file for analysis.

Practical Applications

  • Security Monitoring: Quickly identify events tied to suspicious IP activity.
  • Incident Investigation: Focus on recent logs for faster issue resolution.
  • Data Analysis: Exported CSV files can be reviewed in Excel or other tools.

Conclusion

This script is a concise, efficient way to analyze recent security events related to a specific IP address. Adjust the IP and time range as needed for your specific use case, and use the exported data to inform your network security actions.

Monday, 9 December 2024

Understanding Microsoft SQL Index Fragmentation and How to Manage It

Introduction

Indexes in SQL Server play a crucial role in improving query performance by allowing faster access to data. However, over time, these indexes can become fragmented, leading to slower queries and increased system resource usage. In this post, we’ll explore what index fragmentation is, its types, and how to address it effectively.

What Is Index Fragmentation?

Index fragmentation occurs when the logical order of data pages in an index no longer matches their physical order on disk. This misalignment can cause SQL Server to work harder to retrieve ordered data, negatively impacting performance.

Types of Fragmentation:

  1. Internal Fragmentation:

    • Happens when data pages contain excessive free space, often due to page splits during inserts or updates.
    • Leads to inefficient use of storage and additional I/O operations.
  2. External Fragmentation:

    • Occurs when the logical sequence of pages doesn’t align with their physical storage order.
    • Results in extra effort for SQL Server to return ordered results.

When to Reorganize or Rebuild Indexes

To manage fragmentation, SQL Server provides two options:

  • Reorganize:
    • A lightweight, online operation that defragments the index at the leaf level by reordering pages.
    • Minimal system resource usage and can be safely interrupted.
  • Rebuild:
    • A more intensive process that completely recreates the index, removing fragmentation.
    • Can be done online or offline, depending on your SQL Server edition.
    • Requires more resources but provides thorough optimization.

Key Considerations for Online Index Rebuilds:

  • Enterprise Edition: Supports online rebuilds, allowing uninterrupted access to data.
  • Standard and Other Editions: Requires offline rebuilds, during which data access is temporarily restricted.

Best Practices

  • Reorganize when fragmentation levels are between 5% and 30%.
  • Rebuild when fragmentation exceeds 30%.

These thresholds may vary depending on workload and system specifics. Regular monitoring of fragmentation levels helps maintain optimal performance.

------------Code----------

SET NOCOUNT ON;

-- Create a temporary table for results
IF OBJECT_ID('tempdb..#Fragmentation') IS NOT NULL DROP TABLE #Fragmentation;

CREATE TABLE #Fragmentation (
    DatabaseName NVARCHAR(128),
    TableName NVARCHAR(128),
    IndexName NVARCHAR(128),
    IndexType NVARCHAR(60),
    AvgFragmentationPercent FLOAT,
    FragmentCount INT
);

-- Declare variables
DECLARE @DBName NVARCHAR(128);
DECLARE @SQL NVARCHAR(MAX);

-- Iterate through all databases
DECLARE dbCursor CURSOR FOR
SELECT name FROM sys.databases
WHERE state_desc = 'ONLINE' AND name NOT IN ('master', 'tempdb', 'model', 'msdb');

OPEN dbCursor;
FETCH NEXT FROM dbCursor INTO @DBName;


WHILE @@FETCH_STATUS = 0
BEGIN
    SET @SQL = '
    USE [' + @DBName + '];
    INSERT INTO #Fragmentation
    SELECT 
        DB_NAME() AS DatabaseName,
        OBJECT_NAME(ips.object_id) AS TableName,
        i.name AS IndexName,

        CASE 
            WHEN i.type = 1 THEN ''Clustered Index''
            WHEN i.type = 2 THEN ''Non-Clustered Index''
            WHEN i.type = 3 THEN ''XML Index''
            ELSE ''Unknown''
        END AS IndexType,

        ips.avg_fragmentation_in_percent AS AvgFragmentationPercent,

        ips.page_count AS FragmentCount

    FROM 
        sys.dm_db_index_physical_stats(DB_ID(), NULL, NULL, NULL, ''LIMITED'') ips

    JOIN 
        sys.indexes i ON ips.object_id = i.object_id AND ips.index_id = i.index_id

    WHERE 
        ips.avg_fragmentation_in_percent > 5

    AND 
        ips.page_count > 1;';

    EXEC sp_executesql @SQL;
    FETCH NEXT FROM dbCursor INTO @DBName;
END;

CLOSE dbCursor;
DEALLOCATE dbCursor;

-- Display results
SELECT * FROM #Fragmentation
ORDER BY DatabaseName, AvgFragmentationPercent DESC;

-- Clean up
DROP TABLE #Fragmentation;


Sunday, 25 August 2024

Understanding and Implementing BIMI TXT Records

Brand Indicators for Message Identification (BIMI) is an innovative standard that empowers brands to showcase their logo in email clients that are compatible with BIMI. This feature not only bolsters brand recognition but also fosters trust among email recipients. Here's a concise guide on what BIMI TXT records are and how to utilize them.

A BIMI TXT record is a string of text incorporated into your domain's DNS records. It contains the URL of your logo file, which should be a Scalable Vector Graphics (SVG) file.

To establish a BIMI record, you initially need an SVG logo file uploaded to your domain's web storage. Subsequently, you will need to create a TXT record with the following content:

v=BIMI1;l=[your SVG file URL]

This simple step allows your brand's logo to appear in supporting email clients, enhancing your brand's visibility and trustworthiness.

Saturday, 17 August 2024

Windows Memory compression (More RAM at the expanse of CPU)

In its 10525 build, Windows 10 introduced a feature known as Memory Compression also included in Windows 11. This feature aims to optimize the utilization of your system’s physical memory and reduce the need for disk-based pagefile IO operations.

Memory Compression works by compressing infrequently accessed pages and retaining them in a new compression store within the physical RAM. This process allows your PC’s RAM to store more data than its original capacity, which can enhance your system's performance.

For instance, if your PC has 8 GB of RAM available, and there’s 9 GB of data to be stored on it, Memory Compression will attempt to compress the extra data so it fits within the 8 GB capacity of your RAM. Without Memory Compression, your PC would store the extra data in a file on your hard drive storage, which can slow down your PC as it takes more time to read data from a file on the hard drive than from RAM.

While Memory Compression can improve performance, it does use more CPU resources. If you notice a lot of compressed memory and think it’s slowing down your PC, there are a couple of solutions. One solution is to install more physical memory (RAM). This will allow your system to store more data in RAM without needing to compress it, reducing the CPU usage associated with Memory Compression.

If installing more RAM is not feasible, you can disable Memory Compression. Here’s how:

  1. Open the Command Prompt as an administrator.
  2. Type the following command and press Enter: `Disable-MMAgent -mc`
  3. Restart your computer.

In conclusion, Memory Compression is a feature designed to optimize your system's performance by making efficient use of your RAM. It's a tool that can be beneficial, but like all tools, it's important to understand how it works and when to use it.

Sunday, 11 August 2024

The risk if AI model collapse / The death of generative AI

Model collapse refers to a phenomenon where machine learning models gradually degrade due to errors stemming from unchecked training on synthetic data. Specifically, this synthetic data includes outputs from other models, including prior versions of the same model. There are two distinct stages of model collapse:

  1. Early Model Collapse: In the early stages of collapse, it can be hard to detect as performance could appear to improve while the AI starts to lose its grasps on the smaller details.

  2. Late Model Collapse: This is where performance and accuracy both start to suffer greatly, with the AI becoming confused and losing much of its variance.
A study by Duke University researcher Emily Wenge where an AI model was giving a task of generating dog breeds, at first the AI would recreate breeds most common in its training data and may start to over represent a single group of breeds if it's held more in its data.

As new generations are trained using the older generation data it would compound the over representation until rare breeds disappeared from the newer generated data all together, over time this would lead to a total collapse where the new AI would just be outputting a single breed of dog.

This risk of collapse undermines and threatens generative AI as a useful tool and as human generated content is starting to be limited to the AI training set and AI generated content is on the rise are we heading towards a totally avoidable dumbing of AI.

Should we not reframe our view on AI in this process and allow it the same freedom of access as a human to the data online. allowing the growth of a tool that could change how we interact with information on a whole.


Monday, 15 July 2024

Enable Wireless Diagnostics in Windows

  1.  Open Event Log
  2. Go to View and tick "Show Analytic and Debug logs 


  3. Go to "Applications and Services logs > Microsoft > Windows > WLAN-AutoConfig" and right-click on "Diagnostic" and go to "Properties"
  4. and tick "Enable logging"
This should now bring more meaningful results for "Netsh wlan show wlanreport"

Wednesday, 3 April 2024

How to Backup BitLocker Key to Azure AD Using PowerShell

BitLocker is a security feature built into Windows that provides encryption for entire volumes. It addresses the threats of data theft or exposure from lost, stolen, or inappropriately decommissioned devices. By encrypting the hard drive where Windows is installed, or the entire computer if it has multiple drives, BitLocker helps protect your data.

BitLocker is particularly useful as it provides protection against unauthorised changes to your system such as firmware-level malware. It also helps mitigate unauthorised data access by enhancing file and system protections. BitLocker is an essential tool for securing your data, especially when data breaches and information theft are common.

The Command

Here is the command that we’ll be using:

BackupToAAD-BitLockerKeyProtector -MountPoint $env:SystemDrive -KeyProtectorId ((Get-BitLockerVolume -MountPoint $env:SystemDrive ).KeyProtector | where {$_.KeyProtectorType -eq "RecoveryPassword" }).KeyProtectorId

This command backs up the BitLocker key protector of type “RecoveryPassword” for the system drive to AAD.

Outputting the Key Protector to the Screen

If you want to output the key protector to the screen, you can use the following command:

(Get-BitLockerVolume -MountPoint C).KeyProtector

This command retrieves the key protector for the C drive and outputs it to the screen.

Wednesday, 27 March 2024

Resolving PowerShell Module Installation Error


When installing a PowerShell module, you may encounter the following error:

WARNING: Unable to resolve package source 'https://www.powershellgallery.com/api/v2'

This error can occur due to various reasons, but one common cause is related to the Transport Layer Security (TLS) version that your PowerShell system is using.

The Role of TLS

The PowerShell Gallery, where PowerShell modules are hosted, only accepts connections using TLS 1.2 or later. If your system is using an older version of TLS, it may fail to establish a connection with the PowerShell Gallery, resulting in the error mentioned above.

The Solution

To resolve this issue, you need to force your PowerShell system to use TLS 1.2. This can be achieved by running the following command in your PowerShell session:

[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

This command sets the security protocol of your PowerShell session to TLS 1.2. After running this command, you should be able to install the PowerShell module without encountering the error.

Please note that this change will only apply to the current PowerShell session. If you start a new session, you will need to run the command again.

Wednesday, 20 March 2024

How to Troubleshoot Sophos UTM Update Failures Due to Insufficient Disk Space

Upon deploying Sophos UTM appliances, you might find that the Up2Date process fails due to a lack of disk space. This is common if there's a backlog of updates or if the appliance was initialized with an outdated build. Unfortunately, the Sophos UTM interface does not readily indicate this problem, showing only the availability of updates without hinting at potential installation issues.

Diagnosing the Problem

To understand the root cause, you need to inspect the Up2Date log:

Navigate to Management | Up2Date | Configuration.

Switch the Firmware and Pattern Download options to Manual and apply the changes.

Visit Management | Up2Date | Overview, open the live log or select Up2Date Messages, and initiate a check for Up2Date packages.

A message indicating a failure due to insufficient space in /var/up2date/sys confirms the issue.

Resolving Disk Space Issues

Resolution requires cautious shell access, given the potential risks involved. After backing up your system, follow these steps:

Enable shell access on your Sophos UTM and log in as loginuser.

Elevate your access with su – and navigate to /var/up2date/sys.

Verify free space with df –h . and remove outdated updates using rm *.

Recheck the available space to ensure the updates have been cleared.

Triggering Up2Date Firmware Check

After clearing space, initiate a new firmware check and download process with audld.plx --trigger--verbose. Monitor the downloads and stop the process as needed to prevent space exhaustion. Attempt the update installation again, this time using auisys.plx --no-reboot --verbose for a controlled update without automatic reboots.

Finalizing the Update Process

With the necessary updates installed, it's advisable to revert the Up2Date settings to automatic updates for firmware and patterns. This ensures ongoing protection without manual intervention, automating the download while keeping installation under your control.

Friday, 8 March 2024

Mastering Threat Detection with Microsoft 365 Defender Advanced Hunting: Queries and Strategies for Proactive Cybersecurity

Microsoft 365 Defender Advanced Hunting is a powerful, query-based threat hunting tool that allows security professionals to proactively search for threats across their organization's digital environment. This capability is part of Microsoft Defender XDR and enables you to inspect events across devices, emails, applications, and identities within your network by leveraging up to 30 days of raw data. Advanced Hunting is designed to help you identify both known and potential threats through unconstrained searching, using the Kusto Query Language (KQL) for crafting queries.

The tool supports two modes: guided and advanced. If you're new to KQL or prefer a more structured approach, the guided mode offers a query builder to assist you. For those more experienced with KQL, the advanced mode allows for direct query crafting from scratch. It's also possible to use the queries developed during hunting to create custom detection rules, which can then automatically monitor for similar threat patterns and respond to them as needed.

Advanced hunting covers data from various sources within the Microsoft ecosystem, including Microsoft Defender for Endpoint, Office 365, Cloud Apps, and Identity, providing a comprehensive view of your organization's security posture. It's crucial to have the appropriate roles and permissions to access this feature, and data freshness is maintained rigorously with event data being available almost immediately and entity data updated every 15 minutes​​.

Several practical examples showcase the flexibility and power of Advanced Hunting:

Identify Devices with a Specific File:

This query checks if devices have files from a known malicious sender, useful for identifying devices affected by a malware distribution campaign.

EmailAttachmentInfo
| where SenderFromAddress =~ "MaliciousSender@example.com"
| where isnotempty(SHA256)
| join (
    DeviceFileEvents
    | project FileName, SHA256, DeviceName, DeviceId
) on SHA256

Monitor Specific PowerShell Activities:

This example targets PowerShell processes and searches for suspicious commands that could indicate exploitation attempts.

DeviceProcessEvents
| where FileName in~ ("powershell.exe", "powershell_ise.exe")
| where ProcessCommandLine has_any("WebClient", "DownloadFile", "DownloadData", "DownloadString", "WebRequest", "Shellcode", "http", "https")
| project Timestamp, DeviceName, InitiatingProcessFileName, InitiatngProcessCommandLine, FileName, ProcessCommandLine

Logon Events Post-Receiving a Malicious File:

This query investigates logon events occurring within a short timeframe after receiving a malicious file, helping to identify potential breaches.

EmailEvents
| where Timestamp > ago(7d)
| where ThreatTypes has "Malware"
| project EmailReceivedTime = Timestamp, Subject, SenderFromAddress, AccountName = tostring(split(RecipientEmailAddress, "@")[0])
| join (
    DeviceLogonEvents
    | where Timestamp > ago(7d)
    | project LogonTime = Timestamp, AccountName, DeviceName
) on AccountName
| where (LogonTime - EmailReceivedTime) between (0min .. 30min)

Activities from Specific Cloud Apps:

A query to monitor activities from cloud apps, like Microsoft SharePoint Online, involving specific users or IP addresses.

CloudAppEvents
| where Application == "Microsoft SharePoint Online"
| take 100

Investigate Cloud App File Uploads:

For tracking file uploads to SharePoint Online, this modified query adapts to the new CloudAppEvents table.

CloudAppEvents
| where ActionType == "FileUploaded" and Application == "Microsoft SharePoint Online"
| where ObjectType == "File" and ObjectName endswith ".xlsx"
| project Timestamp, ActionType, Application, ObjectName, AccountObjectId, AccountDisplayName, IPAddress, CountryCode

Investigate Defender Folder Access Control

This tracks processes that have been blocked

DeviceEvents
| where ActionType in ('ControlledFolderAccessViolationAudited','ControlledFolderAccessViolationBlocked')

Each of these queries utilizes the Kusto Query Language (KQL) to interrogate various datasets available through Microsoft 365 Defender, from endpoint activities to cloud application events. They demonstrate how flexible and powerful Advanced Hunting can be when identifying, investigating, and responding to potential security threats across an organization's Microsoft 365 environment​​​​​​​

Tuesday, 20 February 2024

Optimizing Disk Space: A Visual Guide to Linux's du Command

Understanding how to monitor and manage disk usage is essential for both administrators and power users. One powerful command that stands out for its utility in managing disk space is 

du -hsx /* | sort -rh | head -10

Let's break down this command to understand its functionality and significance.

The command du -hsx /* | sort -rh | head -10 is a pipeline of three commands, each performing a unique function, working together to report the sizes of the top 10 directories that occupy the most space on the root filesystem:

du -hsx /*: The du (disk usage) command estimates file space usage. The flags used here are:

-h (human-readable): Converts the output to a more readable format using the most appropriate unit (KB, MB, GB).

-s (summarize): Displays only a total for each argument.

-x (one file system): Skips directories on different filesystems, focusing only on the root filesystem.

This part of the command scans all directories in the root (/*) and provides a summarized, human-readable output of their sizes, ensuring it only accounts for directories on the root filesystem.

sort -rh: This command sorts the output from the du command.

-r (reverse): Sorts the output in reverse order, placing larger items at the top.

-h (human-readable): Sorts numbers with unit suffixes (K, M, G, etc.), ensuring that 10M is considered larger than 9G.

head -10: This final command in the pipeline takes the sorted list of directory sizes and displays the top 10 entries. This is particularly useful for quickly identifying which directories are using the most disk space, allowing for efficient space management decisions.

This command is especially useful for system administrators and users who need to quickly identify high disk usage directories to clean up or monitor space usage. By focusing on the largest directories, one can efficiently manage disk space, ensuring that the system remains stable and that critical operations have enough space to function correctly.

Tuesday, 6 February 2024

Alexa Occupancy sense

Alexa's Occupancy Sense is a feature that enhances the functionality of Echo devices by detecting the presence of individuals in a room without any direct command or action from the user, using built-in sensors and microphones to discern activity and occupancy. 

Occupancy Sense leverages environmental cues such as sound and movement to enable Echo devices to initiate predefined routines or actions based on the detected presence of people. This feature automates various tasks, like adjusting lighting or playing media, without requiring specific verbal commands, making interaction with smart home devices more intuitive.

Device Compatibility

This advanced feature is supported by newer models of Echo devices equipped with the necessary hardware to detect occupancy through sound and motion. Users should refer to the most current information from Amazon to determine if their Echo devices are compatible with Occupancy Sense.

Routines and Cooldown Mechanism

When Alexa routines are automatically executed when occupancy is detected they appears to be a cooldown of about 30 minutes, to avoid excessive triggering of the routines.  This cooldown ensures that automated actions, such as activating lights or music, are not only responsive but also practical and not overly frequent.

Wake Word Triggering and Presence Detection

When you use the wake word for an Alexa device, it assumes someone is there. If you have several Echo devices close to each other, talking to one can accidentally activate another because it "hears" the wake word and thinks someone is in the room. To prevent this, you can set a different wake word for each Alexa device in your house. This way, devices won't mistakenly respond when you're talking to another one, keeping things running smoothly.

Wednesday, 26 July 2023

Hyper-V Checkpoint Production vs Standard

Hyper-V, Microsoft's virtualization platform, offers users the flexibility to create checkpoints for their virtual machines. Checkpoints are snapshots of a virtual machine's state at a specific point in time, allowing for easy restoration or troubleshooting. However, it's important to understand the two types of checkpoints available in Hyper-V: standard and production.

Production Checkpoints:

Production checkpoints are the default option for new virtual machines in Hyper-V. These checkpoints utilize backup technology within the guest operating system to create a "point in time" image of the virtual machine. This approach ensures full support for all production workloads and makes production checkpoints similar to application-consistent backups.

Key Characteristics of Production Checkpoints:

Backup Technology: Production checkpoints leverage backup technology inside the guest operating system, ensuring that the checkpoint is created in a manner compatible with production workloads.
Application-Consistent: By utilizing backup technology, production checkpoints provide application-consistent backups, meaning that they capture a point in time where applications and data are in a consistent state.

Suitable for Production Environments: Production checkpoints are designed to be used in production environments and are fully supported for all production workloads.

Standard Checkpoints:

While production checkpoints are ideal for production environments, Hyper-V also offers standard checkpoints primarily meant for development and testing scenarios. Standard checkpoints capture the state, data, and hardware configuration of a running virtual machine, making them useful for recreating specific states or troubleshooting issues.

Key Characteristics of Standard Checkpoints:

Capturing Running State: Standard checkpoints capture the complete state of a running virtual machine, including its data, hardware configuration, and current running processes.

Development and Testing: Standard checkpoints are particularly beneficial for development and testing purposes, enabling users to recreate specific states or conditions of a virtual machine for troubleshooting or experimentation.

Crash-Consistent: Unlike production checkpoints, which are application-consistent, standard checkpoints are crash-consistent, meaning they capture the state as if the virtual machine has experienced a sudden power loss or system crash.

Choosing the Right Checkpoint Type:

When creating checkpoints in Hyper-V, it is crucial to consider the intended use of the virtual machine and select the appropriate checkpoint type accordingly. Production checkpoints are recommended for production environments where workloads require consistent and reliable backups. On the other hand, standard checkpoints are more suitable for development, testing, and troubleshooting scenarios, where the focus is on capturing the running state of the virtual machine

Wednesday, 19 July 2023

Convert pfx SSL (Windows) to PEM with KEY file


Securing websites with SSL certificates is essential for protecting sensitive data and establishing trust with users. Windows Internet Information Services (IIS) provides a straightforward way to generate SSL certificates. However, if you need to work with other systems or perform advanced configurations, converting the certificate to the PEM and KEY file formats using OpenSSL can be beneficial. In this blog post, we will guide you through the process of exporting an SSL certificate from Windows IIS and converting it into PEM and KEY files using OpenSSL.





Prerequisites:

Before we begin, ensure that you have the following prerequisites in place:

  1. Windows Server with Internet Information Services (IIS) installed.
  2. OpenSSL installed on your system. You can download it from the OpenSSL website (https://www.openssl.org/), Linux OS works better for this part,  or you can use chocolatey to install it in to Windows with the following command
choco install openssl -y

Exporting the SSL Certificate from Windows IIS:

  1. Open the Internet Information Services (IIS) Manager on your Windows Server.
  2. In the left-hand pane, select your server name.
  3. In the middle pane, double-click on "Server Certificates."
  4. Locate the SSL certificate you wish to export, right-click on it, and select "Export."

Exporting the Certificate as a PFX File:

  1. In the Export Certificate wizard, select the desired options and click "Next."
  2. Choose a path and filename for the exported file, e.g., "certificate.pfx," and set a secure password.
  3. Click "Finish" to complete the export process.

Converting the PFX File to PEM Format:

  1. Open a command prompt or terminal window.
  2. Navigate to the directory where you saved the OpenSSL executable.
  3. Execute the following command to convert the PFX file to a PEM file without the private key:

openssl pkcs12 -in certificate.pfx -out certificate.nokey.pem -nokeys

Extracting the Private Key:

Run the following command to export the certificate along with the private key:

openssl pkcs12 -in certificate.pfx -out certificate.withkey.pem

Converting the Private Key to KEY Format:

Execute the following command to extract the private key and save it in KEY format:

openssl rsa -in certificate.withkey.pem -out certificate.key

If you no longer need the PEM file containing both the certificate and private key, you can delete it.

Combining PEM and KEY Files:

To combine the PEM and KEY files into a single file, execute the following command:

cat certificate.nokey.pem certificate.key > certificate.combo.pem

This process allows you to work with the certificate in other systems or perform advanced configurations. By following these steps, you can securely manage and transfer SSL certificates across different platforms. Remember to keep the exported files in a secure location and follow best practices for certificate management.

Saturday, 8 July 2023

Using previous files in Windows to restore a file

Have you ever accidentally deleted a file or made changes to it that you regret? Fortunately, Windows has a built-in feature that allows you to restore previous versions of files. This feature is called "Previous Versions" and can be a lifesaver in situations where you need to recover lost data. In this guide, we will walk you through the steps to restore a file using previous versions in Windows.

Step 1: Accessing Previous Versions

The first step to restoring a file using previous versions is to access the feature. To do this, follow these steps:

1. Navigate to the folder that contained the file you want to restore.

2. Right-click on the file and select "Properties" from the context menu.

3. In the Properties window, click on the "Previous Versions" tab.

If you see the message "No previous versions available," it means that Windows does not have any previous versions of the file that you can restore.

Step 2: Selecting a Previous Version to Restore

Once you have accessed the Previous Versions tab, you will see a list of all the available previous versions of the file. Each version will have a timestamp indicating when it was created or last modified. Follow these steps to select a previous version to restore:

1. Select the version you want to restore from the list.

2. Click on the "Restore" button.

3. In the confirmation window, click on "Restore" again to confirm that you want to restore the selected version.

Step 3: Restoring the File

After you have confirmed that you want to restore the selected version, Windows will restore the file to its previous state. Depending on the size of the file, this process may take a few seconds or several minutes. Once the process is complete, you should see the restored file in the folder where it was originally located.

Wednesday, 5 July 2023

Simplifying Passwords: Addressing the Confusion and Overload

In today's digital landscape, password security continues to be a crucial concern for individuals and organizations alike. With an alarming 50% of cyber attacks resulting from stolen credentials (according to the Verizon 2022 Data Breach Investigation Report), it's imperative to revisit our approach to passwords. While some companies have started updating their password requirements, many still rely on outdated practices such as complex combinations of letters, numbers, and special characters. Unfortunately, studies have shown that these requirements often lead to weaker passwords due to user behaviors like password reuse or minor variations. In this blog post, we'll explore a simpler and more effective approach to password security that encourages stronger passwords and reduces the burden on users.

The Problem with Complex Password Requirements

Traditionally, organizations have set stringent password requirements, hoping to enhance security. These requirements often include a mix of uppercase and lowercase letters, numbers, and special characters, as well as mandatory periodic password changes. While these practices may seem logical, they inadvertently create confusion and overload for users. Users tend to resort to insecure methods like writing down passwords or reusing variations of a single password across multiple accounts.

The Simplicity Approach

In recent years, security experts and researchers have advocated for a simpler and more user-friendly approach to password security. One such recommendation is to use a passphrase composed of three randomly chosen words. These words can be connected by a break (e.g., a hyphen) or left as is. The essential aspect is to create a password that is both simple and memorable for the user.

By using a passphrase, users are more likely to create unique and complex passwords. For example, instead of using a password like "P@$$w0rd2023," which is easily guessable and prone to brute-force attacks, one could create a stronger and more memorable passphrase like "correct-horse-battery." This approach not only encourages users to generate stronger passwords but also reduces the burden of remembering complex combinations of characters.

The Importance of Multi-Factor Authentication (MFA) 

While simplifying passwords is a step in the right direction, it's essential to supplement this approach with additional security measures. One highly recommended method is Multi-Factor Authentication (MFA), which adds an extra layer of protection to user accounts. MFA requires users to verify their identity through a second factor, such as a mobile phone or a physical security key, in addition to their password.

By enabling MFA, even if an attacker manages to obtain a user's password, they would still require physical possession of the second factor to gain unauthorized access. This additional layer of security greatly mitigates the risk of successful account breaches and unauthorized logins.

Friday, 30 June 2023

A Beginner's Guide to Using Scribe AI

Scribe AI is an advanced writing tool that uses Artificial Intelligence to generate high-quality content quickly and easily. Whether you're a blogger, marketer, or student, Scribe AI can help you create engaging content in minutes.

In this guide, we'll take a look at how to use Scribe AI to create powerful content.

Getting Started

Before you can start using Scribe AI, you'll need to sign up for an account. You can do this by visiting the Scribe AI website and following the simple sign-up process.

Once you have created an account, you can start using Scribe AI by logging in to your dashboard. Here, you'll find a variety of tools and options to help you generate content.

Using Scribe AI

Scribe AI is very user-friendly and easy to use. To get started, simply select the type of content you want to create, such as a blog post, article, or email. Then, enter your topic or keywords, and Scribe AI will generate a list of relevant content ideas.

Once you've chosen your topic, Scribe AI will generate a first draft of your content. You can then edit and refine this draft until you're happy with the final result. This process can save you hours of time, as Scribe AI will do the heavy lifting for you.

Tips for Using Scribe AI

Here are some tips to help you get the most out of Scribe AI:

1. Choose the Right Keywords

The more targeted your keywords are, the more relevant your content will be. Make sure to choose keywords that are specific to your topic, and avoid using generic terms.

2. Customize Your Content

Although Scribe AI generates high-quality content, you should still customize it to suit your needs. Add your own voice and style to the content to make it more engaging and interesting.

3. Edit and Refine

Don't be afraid to edit and refine your content until you're happy with the final result. Scribe AI is a great starting point, but you should always take the time to make the content your own.