MCPcopy Create free account
hub / github.com/PowerShell/DSC / get_computer_name

Function get_computer_name

resources/WindowsUpdate/src/windows_update/set.rs:16–18  ·  view source on GitHub ↗

Gets the computer name using the COMPUTERNAME environment variable

()

Source from the content-addressed store, hash-verified

14
15/// Gets the computer name using the COMPUTERNAME environment variable
16fn get_computer_name() -> String {
17 std::env::var("COMPUTERNAME").unwrap_or_else(|_| "localhost".to_string())
18}
19
20pub fn handle_set(input: &str) -> Result<String> {
21 // Parse input as UpdateList

Callers 1

handle_setFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected