IT Questions and Answers :)

Friday, January 24, 2020

In the Cisco IOS CLI for Wireless Access points, what do the following command : " debug capwap client no-reload "

In the Cisco IOS CLI for Wireless Access points, what do the following command : " debug capwap client no-reload "

  • prevents the AP from reloading when it can't join a controller
  • it prevents the AP from reloading when it has active clients in any of the SSIDs
  • prevents the clients from joining the AP during the configuration of it
  • It debugs the latest error logs from the AP 

In the Cisco IOS CLI for Wireless Access points, what do the following command : " debug capwap client no-reload "

EXPLANATION

This is a hidden command that prevents the Access Point from reloading (restart) after trying and do not find a Wireless LAN controller to join its AP pool, this happens only if the Access point is configured as a Lightweight access point.

SOURCE

https://community.cisco.com/t5/wireless-mobility-documents/installing-autonomous-ios-aios-on-a-lightweight-ap-from-the-cli/ta-p/3111153

https://cciewirelessnotes.wordpress.com/tag/capwap/
Share:

Thursday, January 23, 2020

In T-SQL, which of the following is the purpose of the 'WITH' statement?

In T-SQL, which of the following is the purpose of the 'WITH' statement?

  • Create a Common Table Expression
  • Create a derived table
  • Specify filter criteria
  • Join more than two tables 

In T-SQL, which of the following is the purpose of the 'WITH' statement?

EXPLANATION

'WITH' allows you to define a Common Table Expression (a derived table that is referenced and can be referred to multiple times within a query). 'WHERE' would usually be used to specify a filter. A derived table would be written as part of the query and can only be referenced in that instance.
'JOIN' would be used to join tables together regardless of how many.
See: https://msdn.microsoft.com/en-us/library/ms175972.aspx for more details.

SOURCE

https://docs.microsoft.com/en-us/sql/t-sql/queries/with-common-table-expression-transact-sql
Share:

This question is categorized "General Linux" because it has been tested on Linux with "grep". Which of the following strings is NOT matched by the regular expression 'ca*t'

This question is categorized "General Linux" because it has been tested on Linux with "grep". Which of the following strings is NOT matched by the regular expression 'ca*t'

  • cart
  • cat
  • caat
  • ct 

This question is categorized "General Linux" because it has been tested on Linux with "grep". Which of the following strings is NOT matched by the regular expression 'ca*t'

EXPLANATION

cart  does NOT match the regular expression  ca*t  because  the  "r"   in "cart" is not matched.   

caat  matches the "c", the "a" (two times), and the "t" in the regular expression.
cat  matches the  "c", the  "a" (one time), and the  "t"  in the regular expression.
ct  matches the  "c",  the  "a"  (zero times),  and the "t"  in the regular expression.

From:  https://linux.die.net/man/1/grep
"Repetition
A regular expression may be followed by one of several repetition operators:

?
The preceding item is optional and matched at most once.

*
The preceding item will be matched zero or more times.

+
The preceding item will be matched one or more times. "
Note that "bash" will use  *  on the command line to match any string of characters in filenames.  

To match any string of characters with a regex use:     .*    
The period is a regex metacharacter matching any character except newline, and the asterisk metacharacter will expand matches to any length.

Since the asterisk is a globbing character to "bash", it should be escaped when entered on the bash command line with "grep".

Note that the asterisk is escaped in the command below so that bash does not expand the  '*'

$ grep  ca'*'t regex_test
ct
cat
caat
The asterisk could also be escaped to bash via  'ca*t'  or  ca\*t       Escaping passes the  to grep, instead of bash using it to glob filenames in the current directory.

Absent escaping, you could get unexpected results if the asterisk globs a filename:

$ ls
cannot  regex_test  test4
 
$ cat regex_test
ct
cat
caat
cannot
cart
chat

Below, the asterisk is NOT escaped, so bash expanded it to a filename:
$ grep ca*t regex_test
cannot





In the unescaped command above, filename "cannot" was globbed from  ca*t  and passed to grep, making the grep command expand to   "grep cannot regex_test"
Since the file "regex_test" contains the string "cannot" in its data, the results of "grep" are correct for the given command, but that command may have been unintended.

Compare the output of the unescaped  *  above, to the escaped  '*'  in the command below:
$ grep 'ca*t' regex_test
ct
cat
caat

If an unescaped asterisk is parsed by bash, but does not expand to a filename, bash will pass the asterisk to grep (or whatever other command was entered on the command line).  But don't count on bash not  globbing a filename when that's not what you want--always escape characters that are special to bash if you need them passed to your command.

From https://www.tldp.org/LDP/abs/html/globbingref.html
"Bash itself cannot recognize Regular Expressions. Inside scripts, it is commands and utilities -- such as sed and awk -- that interpret RE's.
Bash does carry out filename expansion [1] -- a process known as globbing -- but this does not use the standard RE set. Instead, globbing recognizes and expands wild cards. Globbing interprets the standard wild card characters [2] -- * and ?, character lists in square brackets, and certain other special characters (such as ^ for negating the sense of a match). There are important limitations on wild card characters in globbing, however. Strings containing * will not match filenames that start with a dot, as, for example, .bashrc. [3] Likewise, the ? has a different meaning in globbing than as part of an RE."

Lastly, this is old (but maintained), and a very good writeup on regular expressions: 
http://www.grymoire.com/Unix/Regular.html#TOC


SOURCE

https://linux.die.net/man/1/grep
Share:

Wednesday, January 22, 2020

Which version of Exchange is NOT supported to be a hybrid server?

Which version of Exchange is NOT supported to be a hybrid server?

  • 2016
  • 2013
  • 2010
  • 2007

Which version of Exchange is NOT supported to be a hybrid server?

EXPLANATION

The version of Exchange you have installed in your on-premises organization determines the hybrid deployment version you can install.
You should typically configure the newest hybrid deployment version that's supported in your organization. For example, if your on-premises organization is running Exchange 2007, you need to configure an Exchange 2013-based hybrid deployment.

SOURCE

https://docs.microsoft.com/en-us/exchange/hybrid-deployment-prerequisites
 

Share:

Friday, January 17, 2020

In an Active Directory Domain, the group policy is applied in what order?

In an Active Directory Domain, the group policy is applied in what order?

  • Child OU, Parent OU, Domain – Does not affect Sites or local machine policies.
  • Child OU, OU, Domain, Site, Local Machine.
  • Local Machine policy, then Site, then Domain, then OU, and finally the Child OU
  • OU, Child OU, Domain, Site – Does not affect local machine policies. 
In an Active Directory Domain, the group policy is applied in what order?


EXPLANATION

Order in which policies are applied
You can link Group Policy Objects throughout the hierarchical structure of the Active Directory environment. When you have different policies at different levels, they are applied in the following order unless you explicitly configure them to block inheritance or behave differently:
Local Group Policy Objects are applied first.
Site-level Group Policy Objects are applied in priority order.
Domain-level Group Policy Objects are applied in priority order.
Organizational Unit-level Group Policy Objects are applied in priority order down the hierarchical structure of your organization, so that the last Group Policy Object used in the one that applies to the Organizational Unit the user or computer resides in.
As this set of rules suggests, a Group Policy Object linked to a site applies to all domains at the site. A Group Policy Object applied to a domain applies directly to all users and computers in the domain and by inheritance to all users and computers in organizational units and containers farther down the Active Directory tree.
A Group Policy Object applied to an organizational unit applies directly to all users and computers in the organizational unit and by inheritance to all users and computers in its child organizational units.
You can modify the specific users and computers the GPO is applied to by choosing a different point in the hierarchy, blocking the default inheritance, using security groups to create Access Control Lists, or defining WMI filters.

 

Share:

Popular Posts