Title: The $using: scope for remoting quietly accepts scope modifiers, but resolves to $null · Issue #9204 · PowerShell/PowerShell · GitHub
Open Graph Title: The $using: scope for remoting quietly accepts scope modifiers, but resolves to $null · Issue #9204 · PowerShell/PowerShell
X Title: The $using: scope for remoting quietly accepts scope modifiers, but resolves to $null · Issue #9204 · PowerShell/PowerShell
Description: Affects both: true scope modifiers such as $global: namespace variable notation such as $function: Steps to reproduce Prerequisites: enable remoting on the calling machine run as admin. # Define a variable and function, both named 'foo'....
Open Graph Description: Affects both: true scope modifiers such as $global: namespace variable notation such as $function: Steps to reproduce Prerequisites: enable remoting on the calling machine run as admin. # Define a ...
X Description: Affects both: true scope modifiers such as $global: namespace variable notation such as $function: Steps to reproduce Prerequisites: enable remoting on the calling machine run as admin. # Define a ...
Opengraph URL: https://github.com/PowerShell/PowerShell/issues/9204
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"The $using: scope for remoting quietly accepts scope modifiers, but resolves to $null","articleBody":"Affects both:\r\n\r\n* true scope modifiers such as `$global:`\r\n* namespace variable notation such as `$function:`\r\n\r\n# Steps to reproduce\r\n\r\nPrerequisites:\r\n* enable remoting on the calling machine\r\n* run as admin.\r\n\r\n```powershell\r\n# Define a variable and function, both named 'foo'.\r\nfunction foo { 'func' }; $global:foo = 'var'\r\n# Try to access these definitions remotely via $using\r\nInvoke-Command -ComputerName . { $using:foo; $using:global:foo; $using:function:foo }\r\n```\r\n\r\n# Expected behavior\r\n\r\n```none\r\nvar\r\nvar\r\n 'func' \r\n```\r\n\r\n# Actual behavior\r\n\r\n```none\r\nvar\r\n```\r\n\r\nThat is, `$using:global:foo` and `$using:function:foo` quietly evaluated to `$null`. \r\n\r\n# Environment data\r\n\r\n```none\r\nPowerShell Core 6.2.0-rc.1\r\nWindows PowerShell v5.1 \r\n```\r\n","author":{"url":"https://github.com/mklement0","@type":"Person","name":"mklement0"},"datePublished":"2019-03-22T19:46:55Z","url":"https://github.com/PowerShell/PowerShell/issues/9204"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:f4fb0a5f-5213-3e69-7732-c953a74f1c99 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8DF4:157654:1BCF6:2886F:6AFDD529 |
| html-safe-nonce | d73d58703d102c2d82321ecc15694140b92b0e72382ca3c6c618f11c56f4f3c9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4REY0OjE1NzY1NDoxQkNGNjoyODg2Rjo2QUZERDUyOSIsInZpc2l0b3JfaWQiOiI0NzkwMDMwOTA3OTQxNDQyODU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | 9b02c95729a50d68118304c4613fba2ed170c3647cd7e0ee0ed1bfbb59b7615e |
| hovercard-subject-tag | issue:424373369 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/PowerShell/PowerShell/9204/issue_layout |
| twitter:image | https://opengraph.githubassets.com/6ad70bab207e196c7476552e2f66e04b0daa8594346a97f7b6bac8a6add283d2/PowerShell/PowerShell/issues/9204 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/6ad70bab207e196c7476552e2f66e04b0daa8594346a97f7b6bac8a6add283d2/PowerShell/PowerShell/issues/9204 |
| og:image:alt | Affects both: true scope modifiers such as $global: namespace variable notation such as $function: Steps to reproduce Prerequisites: enable remoting on the calling machine run as admin. # Define a ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mklement0 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 9918bd4004419458bcd838065ac2a76b76ebd11705d73909fff5ab99e996fa23 |
| turbo-cache-control | no-preview |
| go-import | github.com/PowerShell/PowerShell git https://github.com/PowerShell/PowerShell.git |
| octolytics-dimension-user_id | 11524380 |
| octolytics-dimension-user_login | PowerShell |
| octolytics-dimension-repository_id | 49609581 |
| octolytics-dimension-repository_nwo | PowerShell/PowerShell |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 49609581 |
| octolytics-dimension-repository_network_root_nwo | PowerShell/PowerShell |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | a231c174493a6a442c0b0544475c918b30128208 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width