[Home](./index.md) > [bitburner](./bitburner.md) > [NS](./bitburner.ns.md) > [getServer](./bitburner.ns.getserver.md) ## NS.getServer() method Returns a server object for the given server. **Signature:** ```typescript getServer(host?: string): Server; ``` ## Parameters
| Parameter | Type | Description |
|---|---|---|
| host | string | _(Optional)_ Optional. Hostname/IP for the requested server object. Defaults to the server the calling script is running on. |