{"blog_url":"https://tptptb.hatenablog.com/","height":"190","blog_title":"TPTPTb\u2019s blog","categories":["\u4ee4\u548c","PowerShell"],"url":"https://tptptb.hatenablog.com/entry/2020/07/08/205446","provider_name":"Hatena Blog","image_url":null,"published":"2020-07-08 20:54:46","author_url":"https://blog.hatena.ne.jp/TPTPTb/","title":"2020/07/08 #\u7aef\u672b\u500b\u5225\u306b\u7570\u306a\u308b(\u30ed\u30fc\u30ab\u30eb)\u7ba1\u7406\u8005\u6a29\u9650\u3092\u56de\u53ce","provider_url":"https://hatena.blog","version":"1.0","type":"rich","author_name":"TPTPTb","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Ftptptb.hatenablog.com%2Fentry%2F2020%2F07%2F08%2F205446\" title=\"2020/07/08 #\u7aef\u672b\u500b\u5225\u306b\u7570\u306a\u308b(\u30ed\u30fc\u30ab\u30eb)\u7ba1\u7406\u8005\u6a29\u9650\u3092\u56de\u53ce - TPTPTb\u2019s blog\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","width":"100%","description":"\u7686\u69d8\u304a\u306f\u3088\u3046\u3054\u3056\u3044\u307e\u3059\u3001 #\u732b\u3067\u3082\u3067\u304d\u308bPowerShell\uff08\u5099\u5fd8\u9332\uff09 #\u7aef\u672b\u500b\u5225\u306b\u7570\u306a\u308b(\u30ed\u30fc\u30ab\u30eb)\u7ba1\u7406\u8005\u6a29\u9650\u3092\u56de\u53ce $dat=import-Csv '~\\Documents\\[\u7aef\u672b\u5225\u306e\u7ba1\u7406\u8005\u30ea\u30b9\u30c8CSV]' -encoding Default $dat | ForEach-Object { $ho=$_.'HostName';ho; $mem=$_.'samAccountName';$mem; #$sb ={param($m) Add-LocalGroupMember -Group Administrators -Member $m } $sb ={param($m) Remove-Loc\u2026"}