You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+33-33
Original file line number
Diff line number
Diff line change
@@ -1063,48 +1063,50 @@ Default: `false`.
1063
1063
1064
1064
#### sqlserver::get_sql_logins
1065
1065
1066
-
This task will retrieve information about a login, or a set of logins, from the sql instances running on a given node.
1067
-
With no parameters specified it will return summary level information about all logins configured for all sql instances running on a given node or node set.
1068
-
Use the `detailed` parameter to return more detailed information including the SID's and the name of the instance a login was retrieved from.
1066
+
This task retrieves information about a login, or a set of logins, from the sql instances running on a node.
1067
+
1068
+
When no parameters are specified, it returns summary level information about all of the logins configured for all sql instances running on a node or node set.
1069
+
1070
+
Use the `detailed` parameter to return more detailed information, including the SID's and the name of the instance a login was retrieved from.
1069
1071
1070
1072
##### parameters
1071
1073
1072
1074
***instance_name**
1073
1075
1074
1076
The name of the instance to query for logins. By default, leave blank for all instances running on a node.
1075
1077
Pass the values `.`, `MSSQLSERVER`, or the node name to query just the default instance.
1076
-
Named instances can be referred to by either the short name of the instance, or by `<COMPUTERNAME>\<INSTANCE_NAME>`.
1077
-
This is an optional parameter which will accept a single string or array of strings as input.
1078
+
Refer to named instances either by the short name of the instance or by `<COMPUTERNAME>\<INSTANCE_NAME>`.
1079
+
This is an optional parameter which accepts a single string or array of strings as input.
1078
1080
1079
1081
***login_name**
1080
1082
1081
1083
The name of a particular login to search for, or the search pattern for a set of logins.
1082
-
If no value is passed to this variable then all logins are returned.
1084
+
If no value is passed to this variable, all logins are returned.
1083
1085
By default any values passed to this parameter are treated like a search string.
1084
1086
Searches are done using the PowerShell `-match` operator.
1085
1087
For example, if the string `sql` is passed to this parameter, logins such as `NT SERVICE\SQLWriter`
1086
1088
and `##MS_PolicyTsqlExecutionLogin##` will be returned in the result set.
1087
-
If the `exact_match` parameter is set to true, then only exact matches are accepted and neither of those logins would have been returned.
1088
-
This is an optional parameter which will accept a single string or array of strings as input.
1089
+
If the `exact_match` parameter is set to true, only exact matches are accepted and neither of those logins would have been returned.
1090
+
This is an optional parameter which accepts a single string or array of strings as input.
1089
1091
1090
1092
***exact_match**
1091
1093
1092
1094
Set this to true to change the behavior of the `login_name` parameter so that only logins exactly matching one of the provided login_names is returned in the result set.
1093
-
This is an optional parameter which will accept either `true` or `false`. It's default value is false.
1095
+
This is an optional parameter which accepts either `true` or `false`. It's default value is false.
1094
1096
1095
1097
***detailed**
1096
1098
1097
-
This parameter causes the task to return a more detailed level of information for each login.
1098
-
By default the list of properties returned about each login is: `Name`,`isDisabled`,`isLocked`,`IsPasswordExpired`,`CreateDate`,`DateLastModified`.
1099
+
This parameter causes the task to return more detailed information for each login.
1100
+
By default, the list of properties returned about each login is: `Name`,`isDisabled`,`isLocked`,`IsPasswordExpired`,`CreateDate`,`DateLastModified`.
1099
1101
Setting this parameter to true adds in the following properties: `DefaultDatabase`,`DenyWindowsLogin`,`HasAccess`,`ID`,`IsSystemObject`,`Language`,`LanguageAlias`,`,LoginType`,`MustChangePassword`,`PasswordExpirationEnabled`,`PasswordHashAlgorithm`,`PasswordPolicyEnforced`,`SQLSID`,`ADSid`,`WindowsLoginAccessType`,`UserData`,`State`,`IsDesignMode`,`InstanceName`
1100
1102
1101
-
> **A note about `SQLSID` and `ADSID`.**
1103
+
> **Note about `SQLSID` and `ADSID`.**
1102
1104
>
1103
1105
> The `SQLSID` property is this module's property name for the binary representation of a SID that SQLServer keeps internally in tables like `sys.server_principals`.
1104
1106
> It will look like `0x01` for accounts like `sa`, or something longer like `0x0106000000000009010000005FB6DAC7F7DB546D706711B128B5063888B01770` for other accounts.
1105
1107
> This `sid` does not look like a normal `sid` you might see outside of SQLServer, but it is returned as part of the detailed information to make it easier to correlate the logins returned by this module and query results from SQLServer.
1106
-
> The `ADSID` property is a more normal looking `sid` you might get from PowerShell Active Directory query tools.
1107
-
> It is a direct translation of that `SQLSID` into the Microsoft string `sid` form and will look something like `S-1-5-80-1402415987-66678372-3059512406-1823130485-2345841878`.
1108
+
> The `ADSID` property is a more normal looking `sid` you might get from PowerShell Active Directory (AD) query tools.
1109
+
> It is a direct translation of that `SQLSID` into the Microsoft string `sid` form and looks like `S-1-5-80-1402415987-66678372-3059512406-1823130485-2345841878`.
1108
1110
> This translation is done to make it easier to correlate SQLServer logins with AD users and detect when something like a user has been disconnected from its real AD SID.
1109
1111
> If the detailed information for a login does not contain a value for the AD SID property, it means that the login is internal to SQLServer and does not have a valid AD format `sid`.
1110
1112
@@ -1115,8 +1117,8 @@ Use the `detailed` parameter to return more detailed information including the S
1115
1117
***instance_name**
1116
1118
1117
1119
The name of the instance to find the login you are setting properties on.
1118
-
By default this parameter will use the default instance only.
1119
-
Named instances can be referred to by either the short name of the instance, or by `<COMPUTERNAME>\<INSTANCE_NAME>`.
1120
+
By default, this parameter only uses the default instance.
1121
+
Refer to named instances by either the short name of the instance, or by `<COMPUTERNAME>\<INSTANCE_NAME>`.
1120
1122
Specifying an instance name will access only that instance. To affect a login on more than one instance,
1121
1123
specify all of the required instance names as an array of values.
1122
1124
Pass the values `.`, `MSSQLSERVER`, or the node name to query only the default instance.
@@ -1125,8 +1127,8 @@ Use the `detailed` parameter to return more detailed information including the S
1125
1127
***login_name**
1126
1128
1127
1129
The name of a particular login to to set properties on.
1128
-
By default this parameter expects an exact match. To use pattern matching see the `fuzzy_match` parameter.
1129
-
This is an optional parameter which will accept a single string or array of strings as input.
1130
+
By default, this parameter expects an exact match. To use pattern matching see the `fuzzy_match` parameter.
1131
+
This is an optional parameter which accepts a single string or array of strings as input.
1130
1132
1131
1133
***fuzzy_match**
1132
1134
@@ -1135,31 +1137,29 @@ Use the `detailed` parameter to return more detailed information including the S
1135
1137
For example, if the string `sql` is passed to the `login_name` parameter, while `fuzzy_match` is set to true, logins such as `NT SERVICE\SQLWriter`
1136
1138
and `##MS_PolicyTsqlExecutionLogin##` will be returned in the result set.
1137
1139
This is an
1138
-
optional parameter which will accept either `true` or `false`. Its default value is false.
1140
+
optional parameter which accepts either `true` or `false`. Its default value is false.
1139
1141
1140
1142
***enabled**
1141
1143
1142
-
Set this parameter to true to enable a login and set to false to disable it.
1144
+
Set this parameter to true to enable a login. Set to false to disable it.
1143
1145
This is an optional boolean parameter. The return value will be an element in the json return
1144
1146
specifying that the new value for the `isDisabled` property of the login object will be either `true` or `false`.
1145
1147
1146
1148
***password**
1147
1149
1148
1150
Provide a value specifying the new password to use for a login.
1149
-
Please note that there are possible string parsing issues when using this parameter.
1150
-
For instance attempting to set a password `'pa$ssword#"'` may not parse correctly.
1151
-
To get the double quote to end up in the password correctly you will need to triple quote escape the double quote,
1152
-
like so `'pa$ssword#"""'`.
1153
-
To ensure you password is interpreted and set correctly you may want to try to echo the password out using `bolt command run` first
1154
-
to ensure the characters end up on the target node correctly like so, `bolt command run 'Write-Host ''This is """awesome""".'''`
1151
+
Note that there are possible string parsing issues when using this parameter.
1152
+
For example, attempting to set a password `'pa$ssword#"'` may not parse correctly.
1153
+
To get the double quote to end up in the password correctly, triple quote escape the double quote,
1154
+
for example, `'pa$ssword#"""'`.
1155
+
To ensure your password is interpreted and set correctly, try to echo the password out using `bolt command run` first to ensure that the characters end up on the target node correctly, for example, `bolt command run 'Write-Host ''This is """awesome""".'''`
1155
1156
1156
1157
##### noop
1157
1158
1158
1159
This task supports the `--noop` flag. The task will return json values indicating the
1159
1160
actions it would have taken and the logins it would have affected without actually taking any action.
1160
1161
It will not inspect and return to you what the state of a property was before taking the action.
1161
-
Use this parameter especially when using the `fuzzy_match` parameter to ensure you are affecting
1162
-
only the logins you intend to.
1162
+
Use this parameter — especially when using the `fuzzy_match` parameter — to ensure that you are affecting only the logins you intend to.
1163
1163
1164
1164
#### sqlserver::get_sqlagent_jobs
1165
1165
@@ -1168,19 +1168,19 @@ only the logins you intend to.
1168
1168
***instance_name**
1169
1169
1170
1170
The name of the instance to get job information from. Leave this variable blank to return information from all instances by default.
1171
-
Named instances can be referred to by either the short name of the instance, or by `<COMPUTERNAME>\<INSTANCE_NAME>`. Specifying an instance name will access only that instance.
1171
+
Refer to named instances by either the short name of the instance or by `<COMPUTERNAME>\<INSTANCE_NAME>`. Specifying an instance name will access only that instance.
1172
1172
Pass the values `.`, `MSSQLSERVER`, or the node name to query only the default instance.
1173
-
This is an optional parameter which will accept a single string or array of strings as input.
1173
+
This is an optional parameter which accepts a single string or array of strings as input.
1174
1174
1175
1175
***job_name**
1176
1176
1177
-
The name of a job, or the pattern to match on a jobs name.
1178
-
This is an optional parameter which will accept a single string or array of strings as input.
1177
+
The name of a job, or the pattern, to match on a jobs name.
1178
+
This is an optional parameter which accepts a single string or array of strings as input.
1179
1179
1180
1180
***exact_match**
1181
1181
1182
1182
Set this to true to change the behavior of the `job_name` parameter so that only jobs with names exactly matching one of the provided job_names is returned in the result set.
1183
-
This is an optional parameter which will accept either `true` or `false`. It's default value is false.
1183
+
This is an optional parameter which accepts either `true` or `false`. It's default value is false.
0 commit comments