Netlogon not appaering

Was able to get the NETLOGON share to appear. This took a bit longer than usual as I;ve not seen it like this before. to Resolve I had to:

  1. Click Start, click Run, type regedit, and then click OK.
  2. Locate the following subkey in Registry Editor:
  3.  HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Netlogon\Parameters
  4. In the details pane, right-click the SysvolReady flag, and then click Modify.
  5. In the Value data box, type 0, and then click OK.
  6. Again in the details pane, right-click the SysvolReady flag, and then click Modify.
  7. In the Value data box, type 1, and then click OK.

If there are any files in Netlogon, copy them from a healthy DC.


Enabling LACP between two switches (Port Channels)

This configuration needs to be done on both switches. In this example, we making GigabitEthernet0/1 and 0/2 into a port channel. 

Switch(config)#inter ran gi0/1-2
Switch(config-if-range)#channel-group 1 mode active
Switch(config-if-range)#
Creating a port-channel interface Port-channel 1
%LINK-5-CHANGED: Interface GigabitEthernet0/2, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/2, changed state to up
%LINK-5-CHANGED: Interface GigabitEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface GigabitEthernet0/1, changed state to up
%LINK-5-CHANGED: Interface Port-channel1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel1, changed state to up

It's that easy. 

You can then configure the new Port-Channel interface to be a trunk port and to carry encapsulated traffic (VLans).  

Enabling Layer 3 switching on a Cisco switches

Step 1.

If you have a layer 3 Cisco switch and want to route packets via different VLANs, you need to enable this. 

First do a "Show run" and check to see if:

ip routing

is present. If it is then you're good to go with step 2. If not, just run the command "ip routing".

Step 2.

After creating you VLANs the normal layer 2 way like this:

vlan 10

name NetworkA

You next need to create a VLAN interface like this:

interface VLAN 10

ip adderss 10.1.10.1 255.255.255.0

exit

Finally, you need to add the ports that need to route together to the interface.

If you're connecting a DHCP server to the switch to provide DHCP services, this link should be a trunk port with access to the correct VLANs to provide DHCP. You'd then need to assign an ip helper on the trunk port to point to the DHCP server. This tells the switch to forward any DHCP broadcasts to the DHCP server for any traffic reaching the port. Since the port is a trunk all VLAN traffic is tagged and gets sent to the DHCP server.

 

Configuring Inter VLAN routing on Cisco devices (Router on a Stick method)

This is a quick write up on how to configure inter VLAN routing in Cisco IOS. This guide is mainly to reference the Cisco IOS commands and assumes you can configure the rest at this level. 

Hardware:

Cisco 2911 Router

Cisco 2960 Switch X2

X4 Client PCs

Our objective here is to be able to have devices on VLAN 10, contact devices on VLAN 11. To complicate a little more this will also include a truck between two switches.

1. Configure the PCs IP addresses as follows:

Pc Name: IP / Subnet Mask / Gateway

PC0 - 10.1.10.11 / 255.255.255.0 / 10.1.10.1 [ Will be on VLAN 10 ]

PC1 - 10.1.11.11 / 255.255.255.0 / 10.1.11.1 [ Will be on VLAN 11 ]

PC2 - 10.1.10.12 / 255.255.255.0 / 10.1.10.1 [ Will be on VLAN 10 ]

PC3 - 10.1.11.12 / 255.255.255.0 / 10.1.11.1 [ Will be on VLAN 11 ]

Here, we're setting up the PCs so that PC0 and PC2 are going to go on VLAN 10 and PC1 and PC3 and going to be on VLAN 11 (There is no DHCP server in this LAB). 

2. Next we need to configure the switches, by naming the SW1 and SW2 and then configuring a trunk between them. The cables are connected to GigabitEthernet0/2 on both switches. We also need to create two VLANs (10 and 11). Finally, on SW1, we'll configure another trunk to the router (on a stick).

Name the Switch, set the Gig0/2 interface to truck mode and allow vlan traffic:

We start on SW1 (but this will be repeated for SW2 for the Gi0/2 connection.)

Switch>en

Switch>enable

Switch#conf t

Enter configuration commands, one per line. End with CNTL/Z.

Switch(config)#hostname SW1

SW1(config)#int gi0/2

SW1(config-if)#switchport mode trunk

SW1(config-if)#switchport trunk allowed vlan all 

SW1(config-if)#switchport nonegotiate

SW1(config)#interface gi0/1

SW1(config-if)#switchport mode trunk

SW1(config-if)#switchport trunk allowed vlan all 

SW1(config-if)#switchport nonegotiate

SW1(config)#interface vlan 10

SW1(config-if)#description SALES

exit

SW1(config)#interface vlan 11

SW1(config-if)#description MARKETING

exit

 

Next we add the ports Fa0/1 and Fa0/2 to their respective VLANs

SW1(config)#interface fa0/1
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 10
exit
SW1(config)#interface fa0/2
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 11
SW1(config-if)#do show vlan
  [Check the ports are listed in their respective VLANs]

SW1 is now configured. Move on to SW2. You do not need to configure Gi0/1 on SW2 as this has NO link to the router. You can do a "Show run" and copy the out put to text file and amend the host name and remove the gigabitethernet0/1 segment and past it into the console of SW2 to do this quickly. 

Finally, we configure the router on a stick. Here we will be creating two sub interfaces on Gi0/0. They will be Gi0/0.10 and Gi0/0.11. VLAN 10 will have frames switched to Gi0/0.10 and VLAN 11 will have frames switched to Gi0/0.11.

Router#conf t

Router(config)#inter gi0/0

Router(config)#no shutdown

Router(config)#do show ip inter br

Router(config)#interface gi0/0.10

Router(config-subif)#encapsulation dot1Q 10

Router(config-subif)#ip address 10.1.10.1 255.255.255.0

Router(config-subif)#no shutdown

Router(config-subif)#exit

Router(config)#inter gi0/0.11

Router(config-subif)#encapsulation dot1Q 11

Router(config-subif)#ip address 10.1.11.1 255.255.255.0

Router(config-subif)#no shutdown

Router(config-subif)#exit

Router(config)#do show ip interface bri

  [ to check the interfaces are UP ] 

Thats it! your done! If you go to PC0 and ping 10.1.11.12 this will show the inter VLAN routing is working. 

You can Ping PC1, PC2 and PC3 all of which are scattered over various switches on different VLANs.

How to create a PowerShell command to uninstall an application

First, identify the applications in the list from this command:

#Get App 
Get-WmiObject -Class win32_product

Next, filter to the app you want to remove: I'm testing here with "Advanced installer".

#Filter to just the app name
Get-WmiObject -Class win32_product -Filter "Name like '%Advanced Installer 16.5%'"

Next, check the locate the uninstall module:

#Locate the Uninstall() Method of the Win32_Product Class using the Get-Member cmdlet:
Get-WmiObject -Class win32_product -Filter "Name like '%Advanced Installer 16.5%'" | gm

Finally, contstruct your uninstall command like this:

#Use the uninstall method to uninstall.
Get-WmiObject -Class win32_product -Filter "Name like '%Advanced Installer 16.5%'" | ForEach-Object { $_.Uninstall()}