mikebai.com

  • Home
  • dev
  • DotNET
  • M365
  • 搞笑
  • 杂七杂八
  • FocusDict
M365
M365

Linux shell中的竖线(|)——管道符号

管道符号,是unix一个很强大的功能,符号为一条竖线:"|"。 用法: command 1 | command 2 他的功能是把第一个命令command 1执行的结果作为command 2的输入传给command 2,例如: $ls -s|sort -nr (请注意不要复制$符号进去哦) -s 是file size,-n是numeric-sort,-r是reverse,反转 该命令列出当前目录中的文档(含size),并把输出送给sort命令作为输入,sort命令按数字递减的顺序把ls的输出排序。 $ls -s|sort -n 按从小到大的顺序输出。 当然还可进行多次操作,如下面的功能为先去除纯数字,再由sed将竖线(这里不是管道符号)替换为空格,再将结果取出来排序,再进行结果的选择显示,不明白可查看 排序和分页。 cat filename |grep -v '^[0-9]*$' | sed 's/|/ /g' |sort -nrk 8 -nrk 9 |tail -n +1 |head -n 10

2019-05-17 0comments 108hotness 0likes mikebai Read all
M365

Powershell change default variable scope in script

https://stackoverflow.com/questions/29409104/powershell-change-default-variable-scope-in-script Is there an option to change the default variable scope to private for a script? E.g. via PSDefaultParameterValues? I don't like that variables are used from parent when they are note defined in the current scope. Set

2019-05-16 0comments 112hotness 0likes mikebai Read all
M365

About powsershell variable Scopes

https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_scopes?view=powershell-6 09/04/2018 13 minutes to read Contributors      

2019-05-16 0comments 108hotness 0likes mikebai Read all
M365

Change the PowerShell MachinePolicy Execution Policy

FROM: https://absolute-sharepoint.com/2014/03/change-powershell-machinepolicy-execution-policy-windows-server-2012r2.html Background Last week I wanted to try the new SharePoint 2013 SP1 and, as I never install SharePoint without using PowerShell scripts, I tried using the awesome AutoSPInstaller to install my SharePoint. When Windows Server 201 R2 came out, the twitter sphere said that nothing changed except the Execution Policy was “RemoteSigned”. AutoSPInstaller has a Launch.bat file that makes sure the Main.ps1 launches in “ByPass” mode. However, the way AutoSPInstaller works is that it includes two other PowerShell files where the functions are stored. When those get included, the ByPass mode is not in effect anymore, and PowerShell goes back to the Machine Policy, which by default is Remote Signed. It’s a good security measure, but we need to get this fixed! Also for the sake of Google indexing the error for other people, here is the error text: File cannot be loaded. The file is not digitally signed. You cannot run this script on the current system. So, I tried to change the execution policy from Powershell with the following command:

2019-04-19 0comments 123hotness 0likes mikebai Read all
M365

How to edit Local Group Policy with script?

FROM https://serverfault.com/questions/848388/how-to-edit-local-group-policy-with-script I have to set the local Group Policy settings and the the local Security Policy for a couple of machines which are not in a Windows Domain. Until now, I've done that by manually setting the keys in gpedit. Due to the transition to Windows 10 I would like to automate that and use a Batch or PowerShell-Script to do that. It would be very nice if this can be done without 3rd party tools. How can I set these Policys using Powershell or a Batch file? Thank you for your answers in advance! Peter

2019-04-07 0comments 102hotness 0likes mikebai Read all
M365

SharePoint note

02/05 1.IEの自動ログイン機能をオフにする  IE option ⇒ ローカルイントラネット ⇒ レベルのカスタマイズ ⇒ SCROLL最後まで ⇒ ログオン   ⇒ 「ユーザー名とパスワードを入力してログオンする」 を チェックする 2.権限付与  SITE ⇒ Setting ⇒ Site Setting ⇒ Site collection administrators(サイトコレクションの管理者)  サイトの権限 ⇒ 「ユーザー」アクセス許可の付与 OR グループ作成 3.

2019-02-05 0comments 105hotness 0likes mikebai Read all
1…7891011

Recent Posts

  • c# winform适配高dpi
  • com.microsoft.sqlserver.jdbc.SQLServerException “trustServerCertificate”属性设置为“false”,但驱动程序无法使用安全套接字层 (SSL) 加密与 SQL Server建立安全连接
  • java -cp 用法介绍
  • HTML 容器元素
  • MVC的cshtml的介绍

Recent Comments

No comments to show.

COPYRIGHT © 2025 mikebai.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang