File tree 1 file changed +14
-2
lines changed 1 file changed +14
-2
lines changed Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ if ($this.Files -gt 8) {$this.Files = 8};
39
39
Return $this.Files
40
40
```
41
41
42
- ## (Wmi)
42
+ ## HideInstance (Wmi)
43
43
44
44
``` powershell
45
45
Find-Module SQLServer -RequiredVersion "21.0.17279" | Install-Module -AllowClobber -Force
@@ -56,9 +56,21 @@ $WmiObject = @{
56
56
$HideInstance = Get-WmiObject @WmiObject
57
57
```
58
58
59
- ## (Cim)
59
+ ## HideInstance (Cim)
60
60
61
61
``` powershell
62
+ Find-Module SQLServer -RequiredVersion "21.0.17279" | Install-Module -AllowClobber -Force
63
+ Import-Module SQLServer
64
+ $SQLServer = [Microsoft.SqlServer.Management.Smo.Server]::New("localhost")
65
+
66
+ ## apply surface area configuration control 2.12
67
+ $WmiObject = @{
68
+ ComputerName = $SQLServer.NetName
69
+ Namespace = "root\Microsoft\SqlServer\ComputerManagement$($SQLServer.VersionMajor)"
70
+ Class = "ServerSettingsGeneralFlag"
71
+ Filter = "FlagName = 'HideInstance'"
72
+ }
73
+ $HideInstance = Get-CimInstance @WmiObject
62
74
```
63
75
64
76
## GetServiceStartName (Wmi)
You can’t perform that action at this time.
0 commit comments