当前位置:网站首页>powershell_ View PowerShell function source code (environment variable / alias) / take function as parameter
powershell_ View PowerShell function source code (environment variable / alias) / take function as parameter
2022-07-02 04:05:00 【xuchaoxin1375】
see powershell Source code
reference
- magic accelerateViewing PowerShell Function Contents | PDQ.com
General solution
function showSrcCode
{
param(
[parameter(Mandatory = $true)]
# [scriptblock] $command
$command
)
Get-Command $command | Select-Object -ExpandProperty ScriptBlock
}
Invoke the sample
PS C:\Users\cxxu> showSrcCode -command newjunction
param(
$Path,
$Target
)
sudo New-Item -Verbose -ItemType junction -Path $Path -Target $Target
For a function
$function:<functionName>
$function: Invoke the sample
PS C:\Users\cxxu> $Function:newJunction
param(
$Path,
$Target
)
sudo New-Item -Verbose -ItemType junction -Path $Path -Target $Target
environment variable
$env:<environmentName>
Alias
$alias:<AliasName>
边栏推荐
- Use a mask to restrict the input of the qlineedit control
- Déchirure à la main - tri
- 藍湖的安裝及使用
- The original author is out! Faker. JS has been controlled by the community..
- How to solve the code error when storing array data into the database
- 【IBDFE】基于IBDFE的频域均衡matlab仿真
- uni-app - 实现获取手机验证码倒计时 60 秒(手机号+验证码登录功能)
- First acquaintance with string+ simple usage (II)
- Yyds dry inventory compiler and compiler tools
- Flutter中深入了解MaterialApp,常用属性解析
猜你喜欢

Sword finger offer II 006 Sort the sum of two numbers in the array

How to model noise data? Hong Kong Baptist University's latest review paper on "label noise representation learning" comprehensively expounds the data, objective function and optimization strategy of

"No war on the Western Front" we just began to love life, but we had to shoot at everything

Dare to go out for an interview without learning some distributed technology?

The 10th Blue Bridge Cup single chip microcomputer provincial competition

Lei Jun wrote a blog when he was a programmer. It's awesome

The fourth provincial competition of Bluebridge cup single chip microcomputer

66.qt quick-qml自定义日历组件(支持竖屏和横屏)

【人员密度检测】基于形态学处理和GRNN网络的人员密度检测matlab仿真

QT designer plug-in implementation of QT plug-in
随机推荐
How to model noise data? Hong Kong Baptist University's latest review paper on "label noise representation learning" comprehensively expounds the data, objective function and optimization strategy of
Www 2022 | rethinking the knowledge map completion of graph convolution network
The 7th Blue Bridge Cup single chip microcomputer provincial competition
蓝湖的安装及使用
go 变量与常量
Which product of anti-cancer insurance is better?
树莓派GPIO引脚控制红绿灯与轰鸣器
0 foundation how to learn automated testing? Follow these seven steps step by step and you will succeed
Sorted out an ECS summer money saving secret, this time @ old users come and take it away
Wechat applet - realize the countdown of 60 seconds to obtain the mobile verification code (mobile number + verification code login function)
MySQL advanced SQL statement 2
The second game of the 12th provincial single chip microcomputer competition of the Blue Bridge Cup
手撕——排序
Document declaration and character encoding
Is the product of cancer prevention medical insurance safe?
[live broadcast review] the first 8 live broadcasts of battle code Pioneer have come to a perfect end. Please look forward to the next one!
FAQ | FAQ for building applications for large screen devices
C语言:逻辑运算和判断选择结构例题
The 10th Blue Bridge Cup single chip microcomputer provincial competition
【人员密度检测】基于形态学处理和GRNN网络的人员密度检测matlab仿真