mikebai.com

  • Home
  • dev
  • DotNET
  • M365
  • 搞笑
  • 杂七杂八
  • FocusDict
個人BLOG
it developer
M365

aad-joined pc 如何远程链接rdp

rdp对象机设置 > 使用ps将aad user 添加到remote许可组                   Get-LocalGroupMember -Group “Remote Desktop Users”                  Add-LocalGroupMember -Group “Remote Desktop Users” -Member "AzureAD\usr" # 不需要带着upn域名,以C:\Users下用户文件夹名为准                  Get-LocalGroupMember -Group “Remote Desktop Users”                  cmd                   net localgroup "Remote Desktop Users" /add "AzureAD\usr"                  where the-UPN-attribute-of-your-user is the name of the user profile in C:\Users, which is created based on the DisplayName attribute in Azure AD.                rdp对象机设置 > 其他    https://www.niallbrady.com/2017/08/23/how-can-i-rdp-to-an-azure-ad-joined-windows-10-device/     pc > 系统属性 > 远程 > 取消勾选[仅允许运行使用网络别身份验证的远程桌面的计算机连接]   要rpd的物理机设置   添加以下2行    enablecredsspsupport:i:0   authentication level:i:2  进行rdp    输入pcname   不要输入用户名,直接点 连接 按钮 弹出的login页面中输入     AzureAD\usr@domain.com 以上

2022-01-12 0comments 628hotness 1likes mikebai Read all
dev

通过组策略实现IE自动以当前域账号登录某站点

https://www.cnblogs.com/SanMaoSpace/p/4983738.html SharePoint基于windows验证的如何通过组策略实现IE自动以当前域账号登录某站点 1. 在运行中运行MMC,启动“组策略对象编辑器”。 如下图: 2.找到组策略,如下图: 3.找到对应的域,如下图: 4.点右键编辑:

2022-01-03 0comments 509hotness 1likes mikebai Read all
dev

Group Policy (GPO) Not Being Applied to Clients

http://woshub.com/group-policy-not-applied-troubleshooting/?utm_source=pocket_mylist In this GPO troubleshooting guide, I’ll try to tell you about the typical reasons why a certain Group Policy Object (GPO) might not apply to an organizational unit (OU) or a specific domain computer/user. I think this article will be useful for both novice and experienced AD Group Policy administrators to understand how Group Policies work and GPO architecture. The article describes potential problems with applying GPOs related to the policy settings at the domain level, as well as troubleshooting GPOs on Windows clients. Almost all settings described in the article are configured using the Group Policy Management Console (GPMC.msc). Contents:

2022-01-02 0comments 1898hotness 0likes mikebai Read all
M365

PS函数中使用ref参数递归

PowerShellの再帰処理と参照渡し引数 https://pswork.jp/powershell/recursive-reference/ PowerShellのメソッドで、参照渡し引数の使い方をつい忘れてしまうことがあるので、再帰処理と併用したコードサンプルを残します。 考え方として、グローバルスコープの変数を使用すれば、わざわざ参照渡しにしなくても済むものですが、メソッド自体の汎用性も無くなってしまい、スクリプトそのものがガチガチになって手を入れにくいものになってしまうので、参照渡し引数を扱えるほうが良いです。 サンプルとして、参照渡しに使用する変数は、ファイルを表す FileInfo クラスを配列として保持する変数にします。 再帰処理としては、フォルダー階層の配下のファイルを列挙するというものにします。 まず、配列変数を宣言しておき、これを参照変数として使います。

2021-12-16 0comments 457hotness 0likes mikebai Read all
dev

openwrt - 强制接触pc租约

不想手动设置PC的IP,又希望在路由器里固定IP,设置长期租约后,强迫症想要马上生效,可以用以下方式清理DHCP分配的IP: 编辑 /tmp/dhcp.leases 文件,删除想清理的IP地址/MAC地址那一行 重启dnsmasq:/etc/init.d/dnsmasq restart PC上:ipconfig /release 或断网重连即可。

2021-11-21 0comments 489hotness 0likes mikebai Read all
M365

重置powershell console颜色

from>https://www.digitalcitizen.life/how-reset-looks-command-prompt-or-powershell-window/ ------------保存以下内容到[reset-ps-console-color.reg]后执行即可重置------------ Windows Registry Editor Version 5.00 [-HKEY_CURRENT_USER\Console] ------------------------------------------------------------------------------------------ After you work for a while with the Command Prompt or PowerShell, you are likely to end up customizing the way they look. After all, by default, their looks and colors look quite dull for many. You might change the font, its size, the color of the background, and other things. What do you do if you want to reset PowerShell to its default settings and colors? Can you reset Command Prompt's (cmd) colors and settings? Unfortunately, there's no "Restore console default" button available anywhere! Fortunately, as always, there is something you can do. Read this guide to learn how to reset PowerShell or the Command Prompt to its default settings: NOTE: Before following any of the methods from this guide, you should create a System Restore point. That assures you that you can revert your system to its current settings if you don't like the result. How to reset PowerShell to its default color settings PowerShell's colors and overall console looks are stored in its shortcut file instead of a separate file or registry key. In other words, to reset PowerShell to its default color settings, you need to reset PowerShell's shortcut from the Start Menu. Start by 

2021-08-11 0comments 448hotness 0likes mikebai Read all
M365

Format-Table on Array of Hash Tables

from > https://stackoverflow.com/questions/20874464/format-table-on-array-of-hash-tables Using Powershell V4: $table = @( @{ColumnA="Able"; ColumnB=1}, @{ColumnA="Baker"; ColumnB=2}, @{ColumnA="Charlie"; ColumnB=3} )

2021-08-01 0comments 420hotness 0likes mikebai Read all
M365

get box files - recursive

#getBoxFiles.ps1 #created by mikebai 2021/07/15 jpfocus.com $topFolderId = "0" $topFolderName = "BoxTop" # https://developer.box.com/reference/get-folders-id-items/ # https://developer.box.com/reference/resources/file/#param-content_created_at # file info props > https://developer.box.com/reference/get-files-id/#response-example $urlTemplate = "https://api.box.com/2.0/folders/{0}/items?fields=name,id,type,created_by,created_at,modified_at,modified_by&limit=100000" $devToken = "xxxxxxxxxxxxxxx" # you can get dev token id from > https://app.box.com/developers/console $formatter1 = "yyyy_MM_dd" $formatter2 = "yyyy_MM_dd__HH_mm_ss" $formatter3 = "yyyy/MM/dd HH:mm:ss" $scriptFolder = split-path -parent $MyInvocation.MyCommand.Definition $tabTag = "`t" $Headers = @{} $Headers = @{"Authorization" = "Bearer $devToken" } function getFiles {     param (         [Parameter(Mandatory = $true)]         [ValidateNotNull()]         [string]$parentFolderId,         [Parameter(Mandatory = $true)]         [ValidateNotNull()]         [string]$parenFoldertName,         [Parameter(Mandatory = $true)]         [ValidateNotNull()]         [Int32]$layerLevel     )     $url = $urlTemplate -f $parentFolderId     $fileInfoList = Invoke-RestMethod -Method Get -Uri $url -Headers $Headers     if ( $null -eq $fileInfoList -or $null -eq $fileInfoList.entries -or 0 -eq $fileInfoList.entries.Length) {      

2021-07-15 0comments 403hotness 0likes mikebai Read all
M365

NAT、DANT、SNAT的区别

NAT NAT(Network Address Translation,网络地址转换)是将IP 数据包头中的IP 地址转换为另一个IP 地址的过程。在实际应用中,NAT 主要用于实现私有网络访问公共网络的功能。这种通过使用少量的公有IP 地址代表较多的私有IP 地址的方式,将有助于减缓可用IP地址空间的枯竭。 DNAT DNAT Destination Network Address Translation 目的网络地址转换 SNAT SNAT Source Network Address Translation 源网络地址转换,其作用是将ip数据包的源地址转换成另外一个地址 区分SNAT和DNAT 从定义来讲它们一个是源地址转换,一个是目标地址转换。都是地址转换的功能,将私有地址转换为公网地址。 要区分这两个功能可以简单的由连接发起者是谁来区分: 内部地址要访问公网上的服务时(如web访问),内部地址会主动发起连接,由路由器或者防火墙上的网关对内部地址做个地址转换,将内部地址的私有IP转换为公网的公有IP,网关的这个地址转换称为SNAT,主要用于内部共享IP访问外部。 当内部需要提供对外服务时(如对外发布web网站),外部地址发起主动连接,由路由器或者防火墙上的网关接收这个连接,然后将连接转换到内部,此过程是由带有公网IP的网关替代内部服务来接收外部的连接,然后在内部做地址转换,此转换称为DNAT,主要用于内部服务对外发布。

2021-03-28 0comments 375hotness 0likes mikebai Read all
M365

Load Balancer, Azure Application Gateway and Azure Traffic Manager

In this article we will look at the various load balancing solutions available in Azure and which one should be used in which scenario.   Background Load balancer are the essential components when it comes to creating high available web applications. We have all used load balancers with traditional on premise servers where our application is running on N instances and a load balancer is sitting in front of these servers and distributing load to them based on some predefined algorithm and connection affinity settings. Moving to the cloud, we need to understand how we can achieve the same load balancing using Azure components. Load balancing in cloud applications require much more thought that having a simple load balancer in front of some servers as we could have services hosted on PaaS, we could have services running on separate instances for separate tenants and we could also have applications running on multiple servers that are geographically distributed across the world. For this reason itself, there are multiple components available in Azure for load balancing. Each of these components have a different purpose and we need to choose the right component for the scenario to be able to achieve the optimal application architecture. Azure Load Balancing Solutions There are mainly 3 load balancing components available in Azure. Azure Load balancer Azure Application gateway Azure traffic manager Let’s start understanding each of these components one by one and try to understand when to use each component effectively. Azure Load balancer Azure Load Balancer is a Load Balancer in a more classical sense…

2021-03-28 0comments 354hotness 0likes mikebai Read all
12345…62

Recent Posts

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

Recent Comments

No comments to show.

COPYRIGHT © 2025 mikebai.com. ALL RIGHTS RESERVED.

Theme Kratos Made By Seaton Jiang