---
title: "SCNetworkServiceSetEnabled(_:_:)"
framework: systemconfiguration
role: symbol
role_heading: Function
path: "systemconfiguration/scnetworkservicesetenabled(_:_:)"
---

# SCNetworkServiceSetEnabled(_:_:)

Enables or disables the specified service.

## Declaration

```swift
func SCNetworkServiceSetEnabled(_ service: SCNetworkService, _ enabled: Bool) -> Bool
```

## Parameters

- `service`: The network service to enable or disable.
- `enabled`: Pass TRUE if the service should be enabled; FALSE otherwise.

## Return Value

Return Value TRUE if the enabled status was saved; FALSE if an error occurred.

## See Also

### Configuring Network Services

- [SCNetworkServiceAddProtocolType(_:_:)](systemconfiguration/scnetworkserviceaddprotocoltype(_:_:).md)
- [SCNetworkServiceCopy(_:_:)](systemconfiguration/scnetworkservicecopy(_:_:).md)
- [SCNetworkServiceCopyAll(_:)](systemconfiguration/scnetworkservicecopyall(_:).md)
- [SCNetworkServiceCopyProtocol(_:_:)](systemconfiguration/scnetworkservicecopyprotocol(_:_:).md)
- [SCNetworkServiceCopyProtocols(_:)](systemconfiguration/scnetworkservicecopyprotocols(_:).md)
- [SCNetworkServiceCreate(_:_:)](systemconfiguration/scnetworkservicecreate(_:_:).md)
- [SCNetworkServiceEstablishDefaultConfiguration(_:)](systemconfiguration/scnetworkserviceestablishdefaultconfiguration(_:).md)
- [SCNetworkServiceGetEnabled(_:)](systemconfiguration/scnetworkservicegetenabled(_:).md)
- [SCNetworkServiceGetInterface(_:)](systemconfiguration/scnetworkservicegetinterface(_:).md)
- [SCNetworkServiceGetName(_:)](systemconfiguration/scnetworkservicegetname(_:).md)
- [SCNetworkServiceGetServiceID(_:)](systemconfiguration/scnetworkservicegetserviceid(_:).md)
- [SCNetworkServiceGetTypeID()](systemconfiguration/scnetworkservicegettypeid().md)
- [SCNetworkServiceRemove(_:)](systemconfiguration/scnetworkserviceremove(_:).md)
- [SCNetworkServiceRemoveProtocolType(_:_:)](systemconfiguration/scnetworkserviceremoveprotocoltype(_:_:).md)
- [SCNetworkServiceSetName(_:_:)](systemconfiguration/scnetworkservicesetname(_:_:).md)
