Summary: Guest blogger, Michael Blumenthal shows how to findWindows PowerShell cmdlets that are available for Office 365 sites.
Microsoft Scripting Guy, Ed Wilson, is ...
Summary: Use Windows PowerShell to generate a report about Office 365 tenant sites.
How can I use Windows PowerShell to generate a report about my Office 365 tenant...
Can anyone help me out,im not getting Computername through $env:COMPUTERNAME command…its returning as ‘COMPUTENAME’ not my computername
Bharath Radhekrishna 0
$env:computername|Select-Object
Aneela Yekula 0
Can anyone help me out,im not getting Computername through $env:COMPUTERNAME command…its returning as ‘COMPUTERNAME’ not my computername
p m 0
Type “$env:computername” (without the quotes) at the PowerShell prompt, and it will return the computer name — it should work, whether or not “computername” is capitalized.
You can also try:$(Get-WmiObject Win32_Computersystem).name
Callan Browne 0
Hi,
this doesn’t seem to work with Powershell core on my MacBook, is there a new way in powershell core?
thanks,
Michal Zindulka 0
The ComputerName is not defined in any variable on PowerShell core running on macOS, as far as I know. You can use the following alternative on MacBook:
6 comments
Can anyone help me out,im not getting Computername through $env:COMPUTERNAME command…its returning as ‘COMPUTENAME’ not my computername
$env:computername
|
Select-Object
Can anyone help me out,im not getting Computername through $env:COMPUTERNAME command…its returning as ‘COMPUTERNAME’ not my computername
Type “$env:computername” (without the quotes) at the PowerShell prompt, and it will return the computer name — it should work, whether or not “computername” is capitalized.
You can also try:$(Get-WmiObject Win32_Computersystem).name
Hi,
this doesn’t seem to work with Powershell core on my MacBook, is there a new way in powershell core?
thanks,
The ComputerName is not defined in any variable on PowerShell core running on macOS, as far as I know. You can use the following alternative on MacBook:
or shorter: