We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8858cb7 commit 067c758Copy full SHA for 067c758
1 file changed
NtObjectManager/RpcFunctions.ps1
@@ -336,14 +336,17 @@ function Get-RpcServer {
336
}
337
338
339
- if ($AsText) {
340
- foreach ($server in $servers) {
341
- $text = $server.FormatAsText($RemoveComments)
342
- Write-Output $text
+
+ if ($null -ne $servers) {
+ if ($AsText) {
+ foreach ($server in $servers) {
343
+ $text = $server.FormatAsText($RemoveComments)
344
+ Write-Output $text
345
+ }
346
347
+ else {
348
+ Write-Output $servers
349
- }
- else {
- Write-Output $servers
350
351
352
catch {
0 commit comments