Jump to content
View in the app

A better way to browse. Learn more.

Pulseway

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Featured Replies

Posted

When entering the following, script, I get an error. The error message indicates that the script is adding a "$" character to the device name, and I can't figure out why.

This script has been tested verbatim, working, as a locally-run script.. It will not work when pushed through Pulseway's Powershell automation. (generic PREFIX- inserted for relative anonymity)

Screesnshots of Pulseway script Syntax attached, as well as identical, locally run syntax.

####

$name = $env:UserName
$oldName = $env:ComputerName
$newPCName = "PREFIX-" + $name
Rename-Computer -ComputerName $oldName -NewName $newPCName

###

The error message viewed through Pulseway:

Rename-Computer : Skip computer 'bpSurfacePro' with new name 'PREFIX-BPSURFACEPRO$' because the new name is not valid.
The new computer name entered is not properly formatted. Standard names may contain letters (a-z, A-Z), numbers (0-9),
and hyphens (-
), but no spaces or periods (.). The name may not consist entirely of digits, and may not be longer than
63 characters.
+ Rename-Computer -ComputerName $oldName -NewName $newPCName
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (PREFIX-BPSURFACEPRO$:String) [Rename-Computer], InvalidOperationExcept
ion
+ FullyQualifiedErrorId : InvalidNewName,Microsoft.PowerShell.Commands.RenameComputerCommand

renamescriptPW.PNG

renamescriptlocal.jpg

Attached screenshot of a different machine exhibiting the same issue. (Other remote user is not currently online.)

PW_renameSS.PNG

  • Administrators

When you run scripts through Pulseway they run as the local SYSTEM user which is the computer name with a dollar sign at the end. You could use a WMI query to get the username instead like this:

But make sure that you account for the case when there's no user logged into the system.

-Paul

Create an account or sign in to comment

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.